leaningtech-dev team mailing list archive
-
leaningtech-dev team
-
Mailing list archive
-
Message #00183
[Question #249862]: Setting value pointed to by unsigned char*
New question #249862 on Duetto:
https://answers.launchpad.net/duetto/+question/249862
Hi, the following C++:
unsigned char* ptr = arr; // arr is an array of unsigned chars
*ptr = 255;
*(ptr + 1) = 255;
is compiled to
var Ltmp_pi = { a0: 0 };
Ltmp_pi.s = Ltmp_pi;
Lthis.d[Lthis.o].a0[0] = -1;
Lthis.d[Lthis.o].a0[1] = -1;
Note that instead of 255, the value -1 is set
Seems like a duetto bug? Is there a workaround?
--
You received this question notification because you are a member of
Leaningtech Team, which is an answer contact for Duetto.