On 19/10/2025 04:24, Collin Funk wrote:
* gl/lib/mbbuf.h (mbbuf_get_char): Don't set G.len to 1, since mcel_err
has already done it.
---
gl/lib/mbbuf.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/gl/lib/mbbuf.h b/gl/lib/mbbuf.h
index 292b131c6..135b82f80 100644
--- a/gl/lib/mbbuf.h
+++ b/gl/lib/mbbuf.h
@@ -97,7 +97,6 @@ mbbuf_get_char (mbbuf_t *mbbuf)
{
/* Assume the program will emit the byte, but keep the error flag. */
g.ch = mbbuf->buffer[mbbuf->offset++];
- g.len = 1;
}
return g;
}
+1
You might also do this,
but would defer to Paul as to whether it's a layering violation:
mbbuf->offset += g.len;
if (g.err)
g.ch = g.err; /* Return the byte. */
cheers,
Padraig