diff options
Diffstat (limited to 'core/src/fxcrt/fx_extension.cpp')
-rw-r--r-- | core/src/fxcrt/fx_extension.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/src/fxcrt/fx_extension.cpp b/core/src/fxcrt/fx_extension.cpp index d64a06d08b..a75cfb48df 100644 --- a/core/src/fxcrt/fx_extension.cpp +++ b/core/src/fxcrt/fx_extension.cpp @@ -13,6 +13,15 @@ #include <ctime> #endif +#include <cctype> + +int HexCharToDigit(char c) { + if (!std::isxdigit(c)) + return 0; + char upchar = std::toupper(c); + return upchar > '9' ? upchar - 'A' + 10 : upchar - '0'; +} + IFX_FileStream* FX_CreateFileStream(const FX_CHAR* filename, FX_DWORD dwModes) { IFXCRT_FileAccess* pFA = FXCRT_FileAccess_Create(); if (!pFA) { |