From: Mikko Rasa Date: Thu, 1 Sep 2022 19:44:32 +0000 (+0300) Subject: Fix incorrect check for end of string when processing SPIR-V modules X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=8f12c5d2527f61183b2ae36aab224eefbf52086a Fix incorrect check for end of string when processing SPIR-V modules --- diff --git a/source/core/module.cpp b/source/core/module.cpp index 8c69cd7e..5a736914 100644 --- a/source/core/module.cpp +++ b/source/core/module.cpp @@ -320,7 +320,8 @@ SpirVModule *SpirVModule::specialize(const map &spec_values) const { unsigned word = *(op+i++); new_code.push_back(word); - if(!(word&(word>>8)&(word>>16)&(word>>24)&0xFF)) + // Strings are nul-terminated and nul-padded + if(!(word>>24)) break; }