mirror of
https://github.com/mcneel/opennurbs.git
synced 2026-03-06 23:15:54 +08:00
Sync changes from upstream repository
Co-authored-by: Steve Baer <steve@mcneel.com> Co-authored-by: Nathan Letwory <nathan@mcneel.com> Co-authored-by: Dale Lear <dalelear@mcneel.com>
This commit is contained in:
committed by
Will Pearson
parent
b844466e88
commit
799431a63b
@@ -148,20 +148,21 @@ int ON_wString::ScanBufferVargs(
|
||||
va_list args
|
||||
)
|
||||
{
|
||||
#if defined(ON_COMPILER_CLANG) || defined(ON_RUNTIME_LINUX)
|
||||
#if defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
|
||||
if (nullptr == buffer || nullptr == format)
|
||||
return -1;
|
||||
return swscanf(buffer, format, args);
|
||||
#else
|
||||
if (nullptr == buffer || nullptr == format || nullptr == args)
|
||||
return -1;
|
||||
return swscanf_l(buffer, ON_Locale::InvariantCulture.NumericLocalePtr(), format, args);
|
||||
#endif
|
||||
#else
|
||||
if (nullptr == buffer || nullptr == format || nullptr == args)
|
||||
|
||||
#if defined(ON_RUNTIME_WIN)
|
||||
if (nullptr == args)
|
||||
return -1;
|
||||
return _vswscanf_s_l(buffer, format, ON_Locale::InvariantCulture.NumericLocalePtr(), args);
|
||||
#elif defined(ON_RUNTIME_APPLE)
|
||||
if (nullptr == args)
|
||||
return -1;
|
||||
return swscanf_l(buffer, _c_locale, format, args);
|
||||
#elif defined(ON_RUNTIME_ANDROID) || defined(ON_RUNTIME_LINUX)
|
||||
return swscanf(buffer, format, args);
|
||||
#else
|
||||
return swscanf(buffer, format, args);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user