2
0
Эх сурвалжийг харах

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

Roberto Ierusalimschy 15 жил өмнө
parent
commit
9d28e2b3e5
1 өөрчлөгдсөн 14 нэмэгдсэн , 4 устгасан
  1. 14 4
      bugs

+ 14 - 4
bugs

@@ -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
 }