From d0b2f14513f37ec52af71e4a820a113ee5070f3f Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Sat, 3 Nov 2012 03:55:34 +0000 Subject: [PATCH] - added some debug code for network protocol --- source/glest_game/network/network_protocol.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/source/glest_game/network/network_protocol.cpp b/source/glest_game/network/network_protocol.cpp index f9cc2258..673e8d57 100644 --- a/source/glest_game/network/network_protocol.cpp +++ b/source/glest_game/network/network_protocol.cpp @@ -414,8 +414,6 @@ unsigned int unpack(unsigned char *buf, const char *format, ...) { switch(*format) { case 'c': // 8-bit c = va_arg(ap, signed char*); - - printf("unpack int8 = %d [%X]\n",*buf,*buf); // if (*buf <= 0x7f) { // *c = *buf++; // size += 1; @@ -426,6 +424,7 @@ unsigned int unpack(unsigned char *buf, const char *format, ...) { *c = *buf++; size += 1; + printf("unpack int8 = %d [%X] c = %d [%X] c2 = %d [%X]\n",*(buf-1),*(buf-1),*c,(-1 - (unsigned char)(0xffu - *(buf-1)))); break; case 'C': // 8-bit unsigned