summaryrefslogtreecommitdiff
path: root/dtc-lexer.l
diff options
context:
space:
mode:
authorDavid Gibson <dgibson@sneetch.(none)>2005-10-14 11:59:23 +1000
committerDavid Gibson <dgibson@sneetch.(none)>2005-10-14 11:59:23 +1000
commitc6d036eaeca727c9ec6490797cd08dad5a146d51 (patch)
treeeb524220af5614edc80cc0778c2135d8312bf859 /dtc-lexer.l
parentb2543fc875f0cd30231584beb97ccf31bf8a0f88 (diff)
downloaddtc-c6d036eaeca727c9ec6490797cd08dad5a146d51.tar.gz
Oops, use strtoul() instead of strtol() in dtc-lexer.l, so that we
correctly handle cell values above 7fffffff. Bug pointed out by Kumar Gala.
Diffstat (limited to 'dtc-lexer.l')
-rw-r--r--dtc-lexer.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/dtc-lexer.l b/dtc-lexer.l
index cd3229f..438d7d2 100644
--- a/dtc-lexer.l
+++ b/dtc-lexer.l
@@ -82,7 +82,7 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
fprintf(stderr,
"Cell value %s too long\n", yytext);
}
- yylval.cval = strtol(yytext, NULL, 16);
+ yylval.cval = strtoul(yytext, NULL, 16);
DPRINT("Cell: %x\n", yylval.cval);
return DT_CELL;
}