mirror of
https://github.com/RPCSX/SPIRV-Tools.git
synced 2024-12-12 13:45:48 +00:00
Try to fix the Android build.
This commit is contained in:
parent
14c4b10d44
commit
97e2c8fc3d
@ -162,12 +162,12 @@ spv_result_t encodeImmediate(libspirv::AssemblyContext* context,
|
|||||||
assert(*text == '!');
|
assert(*text == '!');
|
||||||
const char* begin = text + 1;
|
const char* begin = text + 1;
|
||||||
char* end = nullptr;
|
char* end = nullptr;
|
||||||
const uint64_t parseResult = std::strtoull(begin, &end, 0);
|
const uint64_t parseResult = strtoull(begin, &end, 0);
|
||||||
size_t length = end - begin;
|
size_t length = end - begin;
|
||||||
if (length != strlen(begin)) {
|
if (length != strlen(begin)) {
|
||||||
context->diagnostic() << "Invalid immediate integer '" << text << "'.";
|
context->diagnostic() << "Invalid immediate integer '" << text << "'.";
|
||||||
return SPV_ERROR_INVALID_TEXT;
|
return SPV_ERROR_INVALID_TEXT;
|
||||||
} else if (length > 10 || parseResult > UINT32_MAX) {
|
} else if (length > 10 || (parseResult >> 32) != 0) {
|
||||||
context->diagnostic() << "Immediate integer '" << text
|
context->diagnostic() << "Immediate integer '" << text
|
||||||
<< "' is over 32 bits.";
|
<< "' is over 32 bits.";
|
||||||
return SPV_ERROR_INVALID_TEXT;
|
return SPV_ERROR_INVALID_TEXT;
|
||||||
|
Loading…
Reference in New Issue
Block a user