X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fmodule.cpp;fp=source%2Fcore%2Fmodule.cpp;h=5a7369147c104558f89eebf717ef87d840db3cb5;hp=8c69cd7e256673bb1887c61a9f82da31539f2cfb;hb=8f12c5d2527f61183b2ae36aab224eefbf52086a;hpb=83fa2fe020c781516a0eadd475448fd0263d75dd 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; }