Commit f2456ad
authored
file: fix hex escapes in magic file (#1051)
A magicfile string can contain common C escapes, defined in ESC table, but also hex and octal ones. Octal escapes do not need a leading zero. Hex escapes need a leading "x". Previously the code attempted to handle hex and octal in one hit, but hex values were incorrectly being fed to builtin oct() function.1 parent 3833c47 commit f2456ad
1 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
502 | | - | |
| 502 | + | |
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
| |||
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
639 | | - | |
| 639 | + | |
| 640 | + | |
640 | 641 | | |
641 | 642 | | |
642 | 643 | | |
| |||
0 commit comments