Mercurial > hg > index.cgi
comparison lwasm/lwasm.c @ 113:7e621e00b887
Fixed uninitialized variable in &-prefix and %-prefix constant parsing
author | lost@l-w.ca |
---|---|
date | Sun, 07 Aug 2011 12:31:19 -0600 |
parents | 40409fd84824 |
children | 697bc543368c |
comparison
equal
deleted
inserted
replaced
112:3fc568436721 | 113:7e621e00b887 |
---|---|
335 return lw_expr_build(lw_expr_type_int, v); | 335 return lw_expr_build(lw_expr_type_int, v); |
336 } | 336 } |
337 | 337 |
338 if (**p == '&') | 338 if (**p == '&') |
339 { | 339 { |
340 val = 0; | |
340 // decimal constant | 341 // decimal constant |
341 (*p)++; | 342 (*p)++; |
342 | 343 |
343 if (**p == '-') | 344 if (**p == '-') |
344 { | 345 { |
357 return lw_expr_build(lw_expr_type_int, val * neg); | 358 return lw_expr_build(lw_expr_type_int, val * neg); |
358 } | 359 } |
359 | 360 |
360 if (**p == '%') | 361 if (**p == '%') |
361 { | 362 { |
363 val = 0; | |
362 // binary constant | 364 // binary constant |
363 (*p)++; | 365 (*p)++; |
364 | 366 |
365 if (**p == '-') | 367 if (**p == '-') |
366 { | 368 { |