PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
ECompile / Scriptengine - Bug (POL 097 2008-02-26)

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 097
Display posts from previous:   

Author Message
OWHorus



Joined: 04 Feb 2006
Posts: 7
Location: Vienna, Austria

PostPosted: Thu Apr 24, 2008 4:20 pm    Post subject: ECompile / Scriptengine - Bug (POL 097 2008-02-26) Reply with quote

Hello all,

an old bug seems to raise it ugly head again Smile.

I reported this quite a long time ago, and it was already fixed. I still have to check if it happens with the last core version before POL 097 2008-02-26:

In certain cases the assignment of an ItemRef to a struct element inside a struct initializer causes the struct and the ItemRef both to become invalid!

How to repeat:
Consider the following small program: It works as a command. Start it and select any item, it does not matter.
If the line marked as 'Bug' is active and the next two lines are commented out, the bug is seen: The print statements in the program print:
<appobj:ItemRef>
<uninitialized object>
<uninitialized object>

If the line marked as 'Bug' is commented out and the next two lines are active, the script runs as it should. Both sets of lines do exactly the same thing. The output as it is expected:
<appobj:ItemRef>
struct{ cmd = 10, field = <appobj:ItemRef>, type = 12 }
<appobj:ItemRef>

Code:

// Ecompile Bug Test
use os;
use uo;
program test(who)
 var testitem := Target(who, 0);  // select any item
 print(testitem);                         // print an itemref
 var ev;
 if (testitem.serial)
    ev := struct {type := 12, cmd := 10, field := testitem};    // Bug !
//    ev := struct {type := 12, cmd := 10, field};            // No Bug
//    ev.field := testitem;                                                    // No Bug      endif
 print(ev);
 print(testitem);
endprogram


Horus

Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 097 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty