Commit 5a64ce45 authored by Johannes Braun's avatar Johannes Braun

Fix recursive replacement issues with non-parameterized macros.

parent 906c4d02
......@@ -143,7 +143,7 @@ namespace glshader::process::impl::macro
else
{
line.replace(line.begin() + static_cast<size_t>(begin - line.data()),
line.begin() + static_cast<size_t>(text_ptr + params_length + 2 - line.data()), expanded_macro.begin(),
line.begin() + static_cast<size_t>(text_ptr + params_length + (params_length == 0 ? 0 : 2) - line.data()), expanded_macro.begin(),
expanded_macro.end());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment