[asterisk-commits] russell: branch 1.4 r85561 - /branches/1.4/include/asterisk/strings.h

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 15 11:34:13 CDT 2007


Author: russell
Date: Mon Oct 15 11:34:13 2007
New Revision: 85561

URL: http://svn.digium.com/view/asterisk?view=rev&rev=85561
Log:
Make a few changes so that characters in the upper half of the ISO-8859-1
character set don't get stripped when reading configuration.
(closes issue #10982, dandre)

Modified:
    branches/1.4/include/asterisk/strings.h

Modified: branches/1.4/include/asterisk/strings.h
URL: http://svn.digium.com/view/asterisk/branches/1.4/include/asterisk/strings.h?view=diff&rev=85561&r1=85560&r2=85561
==============================================================================
--- branches/1.4/include/asterisk/strings.h (original)
+++ branches/1.4/include/asterisk/strings.h Mon Oct 15 11:34:13 2007
@@ -50,7 +50,7 @@
 AST_INLINE_API(
 char *ast_skip_blanks(const char *str),
 {
-	while (*str && *str < 33)
+	while (*str && ((unsigned char) *str) < 33)
 		str++;
 	return (char *)str;
 }
@@ -75,7 +75,7 @@
 		   actually set anything unless we must, and it's easier just
 		   to set each position to \0 than to keep track of a variable
 		   for it */
-		while ((work >= str) && *work < 33)
+		while ((work >= str) && ((unsigned char) *work) < 33)
 			*(work--) = '\0';
 	}
 	return str;
@@ -91,7 +91,7 @@
 AST_INLINE_API(
 char *ast_skip_nonblanks(char *str),
 {
-	while (*str && *str > 32)
+	while (*str && ((unsigned char) *str) > 32)
 		str++;
 	return str;
 }




More information about the asterisk-commits mailing list