summaryrefslogtreecommitdiffstats
path: root/dimension
diff options
context:
space:
mode:
authortavianator <tavianator@antimatter.localdomain>2009-11-24 00:41:27 -0500
committertavianator <tavianator@antimatter.localdomain>2009-11-24 00:41:27 -0500
commite5f268e84dbe121d063de8ec73ad53c36b9e8d83 (patch)
tree0059c2446481e2eda552d277a716e4fd26eab45a /dimension
parenta7bb341bc683f4d43bdddadd66f72234127b9060 (diff)
downloaddimension-e5f268e84dbe121d063de8ec73ad53c36b9e8d83.tar.xz
Fix off-by-one in string lexing.
Diffstat (limited to 'dimension')
-rw-r--r--dimension/flex.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/dimension/flex.l b/dimension/flex.l
index b470159..8c3008d 100644
--- a/dimension/flex.l
+++ b/dimension/flex.l
@@ -80,7 +80,7 @@
#define STRCAT(str, len) \
do { \
token.value = realloc(token.value, string_length + len + 1); \
- strncpy(token.value + string_length, str, len); \
+ strncpy(token.value + string_length, str, len + 1); \
string_length += len; \
CALCULATE_COLUMN(); \
} while(0)