Skip to content
Snippets Groups Projects
Commit 85388f39 authored by rswindell's avatar rswindell
Browse files

More typecasts to defeat MSVC10 assertions.

parent beaf2ac2
No related branches found
No related tags found
No related merge requests found
...@@ -108,7 +108,7 @@ char* DLLCALL strip_space(const char *str, char* dest) ...@@ -108,7 +108,7 @@ char* DLLCALL strip_space(const char *str, char* dest)
if(dest==NULL && (dest=strdup(str))==NULL) if(dest==NULL && (dest=strdup(str))==NULL)
return NULL; return NULL;
for(i=j=0;str[i];i++) for(i=j=0;str[i];i++)
if(!isspace(str[i])) if(!isspace((unsigned char)str[i]))
dest[j++]=str[i]; dest[j++]=str[i];
dest[j]=0; dest[j]=0;
return dest; return dest;
...@@ -131,7 +131,7 @@ char* DLLCALL prep_file_desc(const char *str, char* dest) ...@@ -131,7 +131,7 @@ char* DLLCALL prep_file_desc(const char *str, char* dest)
} }
else if(j && str[i]<=' ' && dest[j-1]==' ') else if(j && str[i]<=' ' && dest[j-1]==' ')
continue; continue;
else if(i && !isalnum(str[i]) && str[i]==str[i-1]) else if(i && !isalnum((unsigned char)str[i]) && str[i]==str[i-1])
continue; continue;
else if((uchar)str[i]>=' ') else if((uchar)str[i]>=' ')
dest[j++]=str[i]; dest[j++]=str[i];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment