BUG in -> string += "other"; optimization

Sciter Forums Bug reports BUG in -> string += "other"; optimization

This topic contains 2 replies, has 2 voices, and was last updated by  Andrew 7 months, 1 week ago.

  • Author
  • #48863


    Andrew, I am having some veeeeery strange problem with string, probably because of the new optimization thing… it is something along this:

    var s = "what";
    Meow(s + "-wow");
    assert(s=="what");// false!!
    assert(s=="what-wow");// true!!

    The sum expression is mutating the variable, with no assignment involved.
    Note however, that this code doesn’t simply reproduces the bug, it happens only in the middle of program execution, some memory+GC problem, because if I do the following:

    gc();// Garbage collect
    var s = "what";
    Meow(s + "-wow");
    assert(s=="what");// true
    assert(s=="what-wow");// false

    no problem occurs..

    • This topic was modified 7 months, 1 week ago by  midi.
  • #48866


    I see what you mean, fixing.

  • #48870


    Fixed in

You must be logged in to reply to this topic.