|
Message-ID: <2558072.nmrdh4bbOR@main.pennware.com>
Date: Sat, 26 May 2012 16:17:49 -0500
From: Richard Pennington <rich@...nware.com>
To: musl@...ts.openwall.com
Subject: A bug in wcsncmp.c
n wasn't getting decremented.
Fix:
#include <wchar.h>
int wcsncmp(const wchar_t *l, const wchar_t *r, size_t n)
{
for (; n && *l==*r && *l && *r; n--, l++, r++);
return n ? *l - *r : 0;
}
-Rich
Content of type "text/html" skipped
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.