diff options
author | Carl Worth <[email protected]> | 2014-06-20 19:17:28 -0700 |
---|---|---|
committer | Carl Worth <[email protected]> | 2014-07-29 15:11:49 -0700 |
commit | 8e8f8ff1b25a4cfd332d9e7c86d3d56cdff98d6a (patch) | |
tree | 526c4d0343aadc30dfd9d283b8caabff9c34422d /src/glsl/glcpp/glcpp-lex.l | |
parent | 0742e0acd302d90dd7f326cf641da61ac60a8508 (diff) |
glsl/glcpp: Fix off-by-one error in column in first-line error messages
For the first line we were initializing the column to 1, but for all
subsequent lines we were initializing the column to 0. The column number is
advanced for each token read before any error message is printed. So the 0
value is the correct initialization, (so that the first column is reported as
column 1).
With this extremely minor change, many of the .expected files are updated such
that error messages for the first line now have the correct column number in
them.
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/glsl/glcpp/glcpp-lex.l')
-rw-r--r-- | src/glsl/glcpp/glcpp-lex.l | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/glcpp/glcpp-lex.l b/src/glsl/glcpp/glcpp-lex.l index 3e533ceda4e..798ff4c1a7b 100644 --- a/src/glsl/glcpp/glcpp-lex.l +++ b/src/glsl/glcpp/glcpp-lex.l @@ -57,7 +57,7 @@ void glcpp_set_column (int column_no , yyscan_t yyscanner); #define YY_USER_INIT \ do { \ yylineno = 1; \ - yycolumn = 1; \ + yycolumn = 0; \ yylloc->source = 0; \ } while(0) |