[UNICODE] Sync with Wine Staging 1.9.11. CORE-11368

svn path=/trunk/; revision=71746
This commit is contained in:
Amine Khaldi 2016-07-02 13:46:41 +00:00
parent 2f09a8e360
commit 83402051c9
4 changed files with 10 additions and 7 deletions

View file

@ -15,7 +15,7 @@ wine-patches@winehq.com and ros-dev@reactos.org
The following build tools are shared with Wine.
reactos/tools/unicode # Synced to WineStaging-1.9.4
reactos/tools/unicode # Synced to WineStaging-1.9.11
reactos/tools/widl # Synced to WineStaging-1.7.55
reactos/tools/wpp # Synced to WineStaging-1.9.4

View file

@ -22,13 +22,13 @@
static inline WCHAR to_unicode_digit( WCHAR ch )
{
extern const WCHAR wine_digitmap[];
extern const WCHAR wine_digitmap[] DECLSPEC_HIDDEN;
return ch + wine_digitmap[wine_digitmap[ch >> 8] + (ch & 0xff)];
}
static inline WCHAR to_unicode_native( WCHAR ch )
{
extern const WCHAR wine_compatmap[];
extern const WCHAR wine_compatmap[] DECLSPEC_HIDDEN;
return ch + wine_compatmap[wine_compatmap[ch >> 8] + (ch & 0xff)];
}

View file

@ -131,7 +131,7 @@ static inline int get_length_dbcs( const struct dbcs_table *table,
for (len = 0; srclen; srclen--, src++, len++)
{
if (cp2uni_lb[*src] && srclen > 1)
if (cp2uni_lb[*src] && srclen > 1 && src[1])
{
src++;
srclen--;
@ -183,7 +183,7 @@ static inline int mbstowcs_dbcs( const struct dbcs_table *table,
for (len = dstlen; srclen && len; len--, srclen--, src++, dst++)
{
unsigned char off = cp2uni_lb[*src];
if (off && srclen > 1)
if (off && srclen > 1 && src[1])
{
src++;
srclen--;
@ -212,7 +212,7 @@ static int mbstowcs_dbcs_decompose( const struct dbcs_table *table,
for (len = 0; srclen; srclen--, src++)
{
unsigned char off = cp2uni_lb[*src];
if (off && srclen > 1)
if (off && srclen > 1 && src[1])
{
src++;
srclen--;
@ -227,7 +227,7 @@ static int mbstowcs_dbcs_decompose( const struct dbcs_table *table,
for (len = dstlen; srclen && len; srclen--, src++)
{
unsigned char off = cp2uni_lb[*src];
if (off && srclen > 1)
if (off && srclen > 1 && src[1])
{
src++;
srclen--;

View file

@ -19,6 +19,7 @@
*/
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
@ -164,6 +165,7 @@ long int strtolW( const WCHAR *nptr, WCHAR **endptr, int base )
if (overflow)
{
errno = ERANGE;
return negative ? LONG_MIN : LONG_MAX;
}
@ -276,6 +278,7 @@ unsigned long int strtoulW( const WCHAR *nptr, WCHAR **endptr, int base )
if (overflow)
{
errno = ERANGE;
return ULONG_MAX;
}