From: H.G. Muller Date: Tue, 27 Oct 2009 03:22:13 +0000 (-0700) Subject: fixed bug related to unsigned char in convert.c X-Git-Tag: v4.4.1~20 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=6e7e288de6a8c59fefdefe7591c74264ed70c832;p=xboard.git fixed bug related to unsigned char in convert.c I also fixed the unsigned-char bug in the convert.c for bitmaps that caused the 129x129 XBoard bitmaps to be defective, and a bug that required fixup with sed afterwards (so I could use it to create a new m33s.bm) --- diff --git a/winboard/bitmaps/convert.c b/winboard/bitmaps/convert.c index c56cf4e..13b5126 100644 --- a/winboard/bitmaps/convert.c +++ b/winboard/bitmaps/convert.c @@ -6,7 +6,7 @@ main(int argc, char **argv) { - int i, j, k, d, cnt; char c, h, w, *p, data[10000], *name; + int i, j, k, d, cnt; char c, *p, data[10000], *name; unsigned char h, w; FILE *f; if(argc<2) { printf("usage is: convert \n"); exit(0); } @@ -54,7 +54,7 @@ main(int argc, char **argv) for(i=0; name[i]; i++) if(name[i] == '.') name[i] = 0; printf("#define %s_width %d\n", name, w); printf("#define %s_height %d\n", name, h); - printf("static char %s_bits[] = {\n", name); + printf("static unsigned char %s_bits[] = {\n", name); cnt = 0; for(i=h-1; i>=0; i--) { for(j=0; j