From ffc681cf223b3f688d2b429575248df65a6d6456 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Wed, 19 May 2010 18:26:02 +0000 Subject: [PATCH] Resolve MSVC10 assertion in iscntrl() for chars >= 0x80. --- src/sbbs3/sbbscon.c | 4 ++-- src/xpdev/genwrap.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sbbs3/sbbscon.c b/src/sbbs3/sbbscon.c index 95d632ac2e..0deef7d552 100644 --- a/src/sbbs3/sbbscon.c +++ b/src/sbbs3/sbbscon.c @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -251,7 +251,7 @@ static int lputs(int level, char *str) printf("\r%*s\r",prompt_len,""); if(str!=NULL) { for(p=str; *p; p++) { - if(iscntrl(*p)) + if(iscntrl((unsigned char)*p)) printf("^%c",'@'+*p); else printf("%c",*p); diff --git a/src/xpdev/genwrap.c b/src/xpdev/genwrap.c index 5f268d8043..00df06ddad 100644 --- a/src/xpdev/genwrap.c +++ b/src/xpdev/genwrap.c @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2008 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public License * @@ -465,7 +465,7 @@ char* DLLCALL truncsp(char* str) if(str!=NULL) { i=len=strlen(str); - while(i && isspace(str[i-1])) + while(i && isspace((unsigned char)str[i-1])) i--; if(i!=len) str[i]=0; /* truncate */ -- GitLab