* The string.sub+find combo Nutshell: Strings from string.sub won t work properly in string.find, giving wrong offsets. Detail: the indexOf in LuaString does not give numbers minus the string offset (which is usually zero). string.find uses said function, where strings with a different offset can be generated by string.sub (it reuses the string bytes) By putting any special pattern character (and parameter 4 is not true), bug goes away. * string.format Takes "%" as a valid format (no format letter passed afterwards) Does not do a separate check to see if a value was specified for current code (shown by above bug). Codes e,E,f,g,G are not implemented and do not handle flags Codes s,c do nothing involving flags like precision and width For o,u,x,X: the flags (space) and + are not ignored. the flag # is not implemented You can never specify all flags at once, the internal counter is always one off * string.rep Breaks if the amount to duplicate is a negative number, should instead return an empty string * tostring doubles are checked as long and if its the same, Long.toString is used (result is still correct but just formatted differently) doing tostring on a double will return a rather low precision string version. LuaDouble is converting the double to a string, by converting it to Float first. * tonumber Numbers are scanned as longs instead of doubles. The simple character subtraction done in scanlong makes it simple, but also results in letters below lowercase "a" being accepted: [\]^_` ` * (internal compiler) Code that relied on lexerror checking if the token was non zero (and adding the "near <something>") message will lack this message. lexerror does this token check, but then throws an error without the additional info.
I've noticed that the string.rep and string.format bugs are missing from the String (API) page.
Seeing as I cannot edit the wiki, it would be nice if someone adds up this info.
EDIT: Added bugs regarding o,u,x,X on string.format
Added bug about max flags
EDIT: Added %c to the no flags list.
EDIT: Mentioned no flags on e,E,f,g,G</something>
Edited by gamax92, 11 July 2014 - 07:12 PM.