You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using c_str() on a .localize()d empty string, we seem to get NULL out rather than an empty string (ATO). For example, the following program:
use CTypes, IO, IO.FormattedIO;
externproc printf(fmt...);
var emptyStr:string="";
var aStr:string="a";
printf("%d%s%s\n", here.id, aStr.c_str(), emptyStr.c_str());
for loc inLocalesdoon loc {
printf("%d%s%s\n", here.id, aStr.localize().c_str(), emptyStr.localize().c_str());
}
prints:
0 a
0 a (null)
1 a (null)
where the lines after the first indicate a bad interaction between c_str() and localize() (or more likely, a bug in localize()).
The text was updated successfully, but these errors were encountered:
When using
c_str()
on a.localize()
d empty string, we seem to getNULL
out rather than an empty string (ATO). For example, the following program:prints:
where the lines after the first indicate a bad interaction between
c_str()
andlocalize()
(or more likely, a bug inlocalize()
).The text was updated successfully, but these errors were encountered: