Mercurial > hg > index.cgi
comparison lwasm/pseudo.c @ 516:c33b4abff860
Fix bug related to parsing \x sequences under pragma cstrings
Fix the test for lower case letter digits to test for the full range of hex
digit values instead of just 0 to 9 when deciding to apply the correction
factor for lower case.
author | William Astle <lost@l-w.ca> |
---|---|
date | Thu, 11 Feb 2021 09:25:16 -0700 |
parents | 74d0c394666e |
children | 724bcc4508bc |
comparison
equal
deleted
inserted
replaced
515:39b75a25044b | 516:c33b4abff860 |
---|---|
367 if (**p) // skip digit 1 | 367 if (**p) // skip digit 1 |
368 { | 368 { |
369 wch = **p - 0x30; | 369 wch = **p - 0x30; |
370 if (wch > 9) | 370 if (wch > 9) |
371 wch -= 7; | 371 wch -= 7; |
372 if (wch > 9) | 372 if (wch > 15) |
373 wch -= 32; | 373 wch -= 32; |
374 (*p)++; | 374 (*p)++; |
375 } | 375 } |
376 if (**p) | 376 if (**p) |
377 { | 377 { |
378 int i; | 378 int i; |
379 i = **p - 0x30; | 379 i = **p - 0x30; |
380 if (i > 9) | 380 if (i > 9) |
381 i -= 7; | 381 i -= 7; |
382 if (i > 9) | 382 if (i > 15) |
383 i -= 32; | 383 i -= 32; |
384 wch = wch * 16 + i; | 384 wch = wch * 16 + i; |
385 } | 385 } |
386 break; | 386 break; |
387 | 387 |