From 69da36c5f841e8c6e5ded6c704d9ef58c57d532a Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Fri, 9 Mar 2018 17:46:50 +0000 Subject: Explicitly mark helper methods that only operate on ASCII ranges A number of our character helper methods take in wide character types, but only do tests/operations on the ASCII range of characters. As a very quick first pass I am renaming all of the foot-gun methods to explictly call out this behaviour, while I do a bigger cleanup/refactor. BUG=pdfium:1035 Change-Id: Ia035dfa1cb6812fa6d45155c4565475032c4c165 Reviewed-on: https://pdfium-review.googlesource.com/28330 Commit-Queue: Ryan Harrison Commit-Queue: dsinclair Reviewed-by: Henrique Nakashima Reviewed-by: dsinclair --- core/fxge/dib/fx_dib_main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'core/fxge/dib/fx_dib_main.cpp') diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp index 68e06a6c5d..f0767f3fc7 100644 --- a/core/fxge/dib/fx_dib_main.cpp +++ b/core/fxge/dib/fx_dib_main.cpp @@ -97,7 +97,7 @@ FX_ARGB StringToFXARGB(const WideStringView& wsValue) { int cc = 0; const wchar_t* str = wsValue.unterminated_c_str(); int len = wsValue.GetLength(); - while (FXSYS_iswspace(str[cc]) && cc < len) + while (FXSYS_iswASCIIspace(str[cc]) && cc < len) cc++; if (cc >= len) @@ -112,7 +112,7 @@ FX_ARGB StringToFXARGB(const WideStringView& wsValue) { } if (cc < len && str[cc] == ',') { cc++; - while (FXSYS_iswspace(str[cc]) && cc < len) + while (FXSYS_iswASCIIspace(str[cc]) && cc < len) cc++; while (cc < len) { @@ -124,7 +124,7 @@ FX_ARGB StringToFXARGB(const WideStringView& wsValue) { } if (cc < len && str[cc] == ',') { cc++; - while (FXSYS_iswspace(str[cc]) && cc < len) + while (FXSYS_iswASCIIspace(str[cc]) && cc < len) cc++; while (cc < len) { -- cgit v1.2.3