diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-08-13 11:09:37 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-08-13 11:09:37 +0000 |
commit | ecf6e517b5f65397507697c28c29981507a052ab (patch) | |
tree | 0bb96ba235be56cee7ce5351478e7679db92e56d /include/parserutils/input | |
parent | 78e86666d3da1a9fd904e8bfc6b8ead22a1520ec (diff) | |
download | libparserutils-ecf6e517b5f65397507697c28c29981507a052ab.tar.gz libparserutils-ecf6e517b5f65397507697c28c29981507a052ab.tar.bz2 |
Move the location of the utf8 buffer every time we're asked for a character in debug mode.
This leaks memory lots, deliberately.
svn path=/trunk/libparserutils/; revision=5081
Diffstat (limited to 'include/parserutils/input')
-rw-r--r-- | include/parserutils/input/inputstream.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/parserutils/input/inputstream.h b/include/parserutils/input/inputstream.h index db81eb0..26f3353 100644 --- a/include/parserutils/input/inputstream.h +++ b/include/parserutils/input/inputstream.h @@ -85,6 +85,8 @@ static inline uintptr_t parserutils_inputstream_peek( if (stream == NULL) return PARSERUTILS_INPUTSTREAM_OOD; + parserutils_buffer_randomise(stream->utf8); + #define IS_ASCII(x) (((x) & 0x80) == 0) if (stream->cursor + offset < stream->utf8->length) { |