diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | src/librcd.c | 4 |
3 files changed, 5 insertions, 4 deletions
@@ -1,3 +1,6 @@ +0.1.7: + * Don't use strnlen + 0.1.6: * Function name is changed to conform LibRCC naming conventions * Other minor changes @@ -1 +1 @@ -0.1.7CVS +0.1.7 diff --git a/src/librcd.c b/src/librcd.c index 18681ae..55eefc0 100644 --- a/src/librcd.c +++ b/src/librcd.c @@ -7,8 +7,6 @@ #define max(a,b) ((a>b)?a:b) #define min(a,b) ((a<b)?a:b) #define bit(i) (1<<i) -#define STRNLEN(str,n) (n?strnlen(str,n):strlen(str)) - typedef struct lng_stat2 { unsigned char a; @@ -259,7 +257,7 @@ static int check_utf8(const unsigned char *buf, int len) { rcd_russian_charset rcdGetRussianCharset(const char *buf,int len) { long l; - l = STRNLEN(buf,len); + l = len?len:strlen(buf); if (check_utf8(buf,l)>1) return RUSSIAN_CHARSET_UTF8; return is_win_charset2(buf,l); } |