Module: wine Branch: refs/heads/master Commit: 797acdf436ae098244c3415c795b128a366ce204 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=797acdf436ae098244c3415c...
Author: Eric Pouech eric.pouech@wanadoo.fr Date: Sun Jun 18 21:32:33 2006 +0200
dbghelp: dwarf: Tidy up leb128 reading.
---
dlls/dbghelp/dwarf.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c index be23e3e..18bf253 100644 --- a/dlls/dbghelp/dwarf.c +++ b/dlls/dbghelp/dwarf.c @@ -207,13 +207,13 @@ static unsigned long dwarf2_leb128_as_un
assert( NULL != ctx );
- while (1) + do { byte = dwarf2_parse_byte(ctx); ret |= (byte & 0x7f) << shift; shift += 7; - if (0 == (byte & 0x80)) { break ; } - } + } while (byte & 0x80); + return ret; }
@@ -226,13 +226,13 @@ static long dwarf2_leb128_as_signed(dwar
assert( NULL != ctx );
- while (1) + do { byte = dwarf2_parse_byte(ctx); ret |= (byte & 0x7f) << shift; shift += 7; - if (0 == (byte & 0x80)) { break ; } - } + } while (byte & 0x80); + /* as spec: sign bit of byte is 2nd high order bit (80x40) * -> 0x80 is used as flag. */