View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000800 | LDMud 3.6 | General | public | 2012-01-08 01:17 | 2022-01-09 20:32 |
Reporter | clutch | Assigned To | Gnomi | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | Linux | OS | CentOS | OS Version | 5.7 |
Fixed in Version | 3.6.5 | ||||
Summary | 0000800: (s)printf truncates when using a 0 in the string | ||||
Description | This is similar to problem 472. When inserting a 0 into a string using sprintf("%c",0) causes problems later using (s)printf. | ||||
Steps To Reproduce | lpc printf("Does not print after %-=30s, really!",sprintf("asd%casd",1>0?0:'s')) | ||||
Additional Information | We are running LD 3.5 pulled from the latest github. | ||||
Tags | sprintf | ||||
|
Interestingly the error does only happen in column mode. |
|
Additional information/examples: # printf("asd%casd",0) -> prints "asdasd" -> works # sprintf("asd%casd",0) -> returns "asdasd" -> works # string str=sprintf("asd%casd",0);printf(str); -> prints "asd" -> fails # sprintf("Does not print after %20s, really!",sprintf("asd%casd",0)) -> works # sprintf("Does not print after %=20s, really!",sprintf("asd%casd",0)) -> fails At least for the last two: column mode (add_column()) seems to use \0 as termination char for columns. |
|
As Paradox@Dune just noted: # string str=sprintf("asd%casd",0);printf("%s",str); -> prints "asdasd" -> works. So the format string should not contain \0, the string argument can, unless in column mode. One error in column mode and one error somewhere else. |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-01-08 01:17 | clutch | New Issue | |
2012-01-08 15:55 | zesstra | Note Added: 0002097 | |
2012-01-08 15:55 | zesstra | Assigned To | => zesstra |
2012-01-08 15:55 | zesstra | Status | new => confirmed |
2012-01-08 15:57 | zesstra | Project | LDMud => LDMud 3.5 |
2012-01-08 15:58 | zesstra | Category | Implementation => Compilation, Installation |
2012-01-08 15:58 | zesstra | Target Version | => 3.5.0 |
2012-01-08 15:59 | zesstra | Assigned To | zesstra => |
2012-01-09 23:12 | zesstra | Note Added: 0002098 | |
2012-01-09 23:18 | zesstra | Note Added: 0002099 | |
2012-01-10 08:32 | zesstra | Note Edited: 0002099 | |
2013-08-18 17:07 | zesstra | Tag Attached: sprintf | |
2015-04-29 22:03 | zesstra | Project | LDMud 3.5 => LDMud 3.6 |
2015-04-29 22:03 | zesstra | Category | Compilation, Installation => General |
2021-04-19 11:38 | Gnomi | Assigned To | => Gnomi |
2021-04-19 11:38 | Gnomi | Status | confirmed => assigned |
2022-01-09 20:32 | Gnomi | Status | assigned => resolved |
2022-01-09 20:32 | Gnomi | Resolution | open => fixed |
2022-01-09 20:32 | Gnomi | Fixed in Version | => 3.6.5 |