1
0
Fork 0
mirror of https://git.suyu.dev/suyu/sirit.git synced 2024-12-22 04:02:03 +00:00

Change count to string_words

Co-authored-by: Rodrigo Locatti <reinuseslisp@airmail.cc>
This commit is contained in:
comex 2020-11-25 18:59:59 -05:00 committed by Rodrigo Locatti
parent 63c5b548c5
commit c095705f59

View file

@ -42,10 +42,10 @@ std::vector<u32> Module::Assemble() const {
}
for (const std::string_view extension_name : extensions) {
size_t count = WordsInString(extension_name);
words.push_back(MakeWord0(spv::Op::OpExtension, count + 1));
size_t string_words = WordsInString(extension_name);
words.push_back(MakeWord0(spv::Op::OpExtension, string_words + 1));
size_t insert_index = words.size();
words.resize(words.size() + count);
words.resize(words.size() + string_words);
InsertStringView(words, insert_index, extension_name);
}