diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-03-16 14:13:13 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-03-16 14:13:13 -0300 |
commit | 513559cc4760392b6fa33754c516683ef49dba22 (patch) | |
tree | 7080bdf0e31f0ce14545a0e8a68daff3b36cec62 /ltests.c | |
parent | e4607523234f16ed9ed0436340b9315377dbfe7f (diff) | |
download | lua-513559cc4760392b6fa33754c516683ef49dba22.tar.gz lua-513559cc4760392b6fa33754c516683ef49dba22.tar.bz2 lua-513559cc4760392b6fa33754c516683ef49dba22.zip |
Fixed bug in 'string.format("%p")'
The string "(null)" used for non-collectable values must be printed as a
string, not as a pointer. (Bug introduced in commit e0cbaa50fa7).
Diffstat (limited to 'ltests.c')
-rw-r--r-- | ltests.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -131,8 +131,7 @@ static void warnf (void *ud, const char *msg, int tocont) { | |||
131 | if (buff[0] != '#' && onoff) /* unexpected warning? */ | 131 | if (buff[0] != '#' && onoff) /* unexpected warning? */ |
132 | badexit("Unexpected warning in test mode: %s\naborting...\n", | 132 | badexit("Unexpected warning in test mode: %s\naborting...\n", |
133 | buff, NULL); | 133 | buff, NULL); |
134 | /* else */ /* FALLTHROUGH */ | 134 | } /* FALLTHROUGH */ |
135 | } | ||
136 | case 1: { /* allow */ | 135 | case 1: { /* allow */ |
137 | if (onoff) | 136 | if (onoff) |
138 | fprintf(stderr, "Lua warning: %s\n", buff); /* print warning */ | 137 | fprintf(stderr, "Lua warning: %s\n", buff); /* print warning */ |