Page 1 of 1

turley evil doings....

Posted: Tue Feb 14, 2012 4:13 pm
by RusseL
01-03-2012 Turley:
Changed: major rewrite of primitive operators +,-,*,/,...
major speedup of +=,-=,...
Added: finally support for +=,-=,*=,/=,%= with objectmembers, like who.resist_fire_mod+=1
Note: if member would return UnInit or Error it does nothing
so its like (only faster and atomic):
var temp:=who.resist_fire_mod;
if (!(TypeOfInt(temp) in {OT_UNINIT,OT_ERROR}))
temp+=1;
who.resist_fire_mod:=temp;
endif

Code: Select all

    print ("whatmaxhp="+what.maxhp);
    print ("whatquality="+what.quality);
    print ("whatquality*what.maxhp="+what.maxhp* what.quality);
log:
  • whatmaxhp=<uninitialized object>
    whatquality=<uninitialized object>
    Segmentation fault
And crash 8)

After 10 hours non-stop searching i got it...
developers should take a look into all of primitive operators, i think... :)

Re: turley evil doings....

Posted: Fri Feb 17, 2012 9:40 am
by Turley
Fixed in rev 511, btw only - and * was affected :P