diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-03-20 13:00:56 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2003-03-20 13:00:56 -0300 |
commit | b518d1407149a23d31b486f5bd3ef9e6daae93c1 (patch) | |
tree | c3dfc35a5aa3612e6657e065233d4b92f0a0fe64 /lzio.c | |
parent | 15dbb5346143a0af082fa96477db788a78fa6c61 (diff) | |
download | lua-b518d1407149a23d31b486f5bd3ef9e6daae93c1.tar.gz lua-b518d1407149a23d31b486f5bd3ef9e6daae93c1.tar.bz2 lua-b518d1407149a23d31b486f5bd3ef9e6daae93c1.zip |
bug: zio mixes a 255 as first char in a buffer with EOZ
Diffstat (limited to 'lzio.c')
-rw-r--r-- | lzio.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lzio.c,v 1.22 2002/10/08 18:46:08 roberto Exp roberto $ | 2 | ** $Id: lzio.c,v 1.23 2002/12/04 17:38:31 roberto Exp roberto $ |
3 | ** a generic input stream interface | 3 | ** a generic input stream interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -22,7 +22,7 @@ int luaZ_fill (ZIO *z) { | |||
22 | if (buff == NULL || size == 0) return EOZ; | 22 | if (buff == NULL || size == 0) return EOZ; |
23 | z->n = size - 1; | 23 | z->n = size - 1; |
24 | z->p = buff; | 24 | z->p = buff; |
25 | return *(z->p++); | 25 | return char2int(*(z->p++)); |
26 | } | 26 | } |
27 | 27 | ||
28 | 28 | ||
@@ -33,7 +33,7 @@ int luaZ_lookahead (ZIO *z) { | |||
33 | z->n++; | 33 | z->n++; |
34 | z->p--; | 34 | z->p--; |
35 | } | 35 | } |
36 | return *z->p; | 36 | return char2int(*z->p); |
37 | } | 37 | } |
38 | 38 | ||
39 | 39 | ||