bug with io.read(op, "*n")

This commit is contained in:
Roberto Ierusalimschy 2010-04-19 15:04:58 -03:00
parent 49ca1f7083
commit 9d28e2b3e5

18
bugs
View File

@ -1880,8 +1880,8 @@ patch = [[
+++ lundump.c 2008/04/04 19:51:41 2.7.1.4
@@ -1,5 +1,5 @@
/*
-** $Id: bugs,v 1.105 2009/11/23 14:59:30 roberto Exp roberto $
+** $Id: bugs,v 1.105 2009/11/23 14:59:30 roberto Exp roberto $
-** $Id: bugs,v 1.106 2010/04/19 16:39:25 roberto Exp roberto $
+** $Id: bugs,v 1.106 2010/04/19 16:39:25 roberto Exp roberto $
** load precompiled Lua chunks
** See Copyright Notice in lua.h
*/
@ -2265,7 +2265,17 @@ since = [[5.0]],
example = [[
x = string.rep("x", 10000) .. "%d"
print(string.format(x)) -- gives wrong error message
patch = [[
]]
patch = nil
}
Bug{
what = [['io.read(op, "*n")' may return garbage if second read fails]],
report = [[Roberto I., 2010/04/12]],
since = [[5.0]],
example = [[
print(io.read("*n", "*n") --<< enter "10 hi"
--> file (0x884420) nil
]],
patch = nil
}