Fix off-by-one error
This commit is contained in:
parent
9d4bf19367
commit
2b9e15920b
2
c/ios.c
2
c/ios.c
|
@ -1014,7 +1014,7 @@ int ios_printf(struct ios *s, const char *format, ...)
|
||||||
if (len < 0) {
|
if (len < 0) {
|
||||||
len = 0;
|
len = 0;
|
||||||
}
|
}
|
||||||
if (len > (int)sizeof(purkka)) {
|
if (len >= (int)sizeof(purkka)) {
|
||||||
lerror(MemoryError, "out of memory in ios_printf buffer");
|
lerror(MemoryError, "out of memory in ios_printf buffer");
|
||||||
}
|
}
|
||||||
ios_write(s, purkka, len);
|
ios_write(s, purkka, len);
|
||||||
|
|
Loading…
Reference in New Issue