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