From 2cde04ddcec3f3c083527c464f93bf8c30b6e790 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Tue, 14 Aug 2007 18:37:16 +0000 Subject: merged over all stuff from 0.2 to trunk --- src/engine/compression.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/engine/compression.cpp') diff --git a/src/engine/compression.cpp b/src/engine/compression.cpp index 5c812d23..427eceb5 100644 --- a/src/engine/compression.cpp +++ b/src/engine/compression.cpp @@ -32,7 +32,7 @@ const unsigned char *vint_unpack(const unsigned char *src, int *i) int sign = (*src>>6)&1; *i = *src&0x3F; - while(1) + do { if(!(*src&0x80)) break; src++; @@ -49,7 +49,7 @@ const unsigned char *vint_unpack(const unsigned char *src, int *i) if(!(*src&0x80)) break; src++; *i |= (*src&(0x7F))<<(6+7+7+7); - } + } while(0); src++; *i ^= -sign; // if(sign) *i = ~(*i) -- cgit 1.4.1