Closed Chromowolf closed 3 years ago
It is bug only occur when addstr input is malaligned constant expression.
function afterTriggerExec() {
setcurpl(getuserplayerid());
const name = Db("\0aBcDeFgH") + 1;
const dbg = StringBuffer(1024);
var title = name + 2;
foreach(i : py_range(5)) {
const i2 = i + i;
dbg.printfAt(i2, "name[{}..] = {:s}", i, name + i);
dbg.printfAt(i2 + 1, "title[{}..] = {:s}", i, title + i);
}
}
function afterTriggerExec() {
setcurpl(getuserplayerid());
const name = Db("\0aBcDe") + 1;
const dbg = StringBuffer(1024);
var title = name;
for(var i = 0 ; i < 5 ; i += 1) {
const i2 = i + i;
dbg.printfAt(i2, "name[{}..] = {:s}", i, name + i);
dbg.printfAt(i2 + 1, "title[{}..] = {:s}", i, title + i);
}
}
Actually it is bug only for formatted print. dbg.printAt(i2, "name[", i, "..] = ", ptr2s(name + i));
works fine. "s" format always converts to "t", epd2s(EPD(constant))
, missing check if constant is dividable by 4.
Fixed in new release 0.9.1.5: https://github.com/armoha/euddraft/releases/tag/v0.9.1.5 Thanks!
Cannot compile. Maybe there is some file missing.
__pycache__
is generated after compile so it is not related.
I have no problem running 🤔
![Uploading image.png…]()
Weird... I deleted the __pycache__
and __epspy__
folders in my project folder, and then it could compile......
thx for the update
The basemap's map name is "abcdef" Memory 0x6D0F91 stores the map name.
Test result:
Is this intended feature or bug? I'm expecting
{:s}
to read from the specified address, not from the alligned address.