1
0
Fork 0

Fix #14385: [Strgen] Don't count parameters more than one time (#14413)

pull/14392/head
Loïc Guilloux 2025-07-04 01:10:50 +02:00 committed by GitHub
parent 16b0371c1b
commit 655291facb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -639,6 +639,8 @@ static size_t TranslateArgumentIdx(size_t argidx, size_t offset)
for (size_t i = 0; i < argidx; i++) { for (size_t i = 0; i < argidx; i++) {
cs = _cur_pcs.consuming_commands[i]; cs = _cur_pcs.consuming_commands[i];
if (cs == nullptr && sum > i) continue;
sum += (cs != nullptr) ? cs->consumes : 1; sum += (cs != nullptr) ? cs->consumes : 1;
} }