mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-05-02 02:23:56 +00:00
Fix PTATCAM parsing: accept colon separator from SI extra data
The SI extra data format uses colon as key-value separator (e.g. PTATCAM:HEAD;INFOHAT), matching KeyValueStringParse's delimiter set. The parser incorrectly required an equals sign, so PTATCAM directives were never found and the feature was completely inactive. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0f600ee29a
commit
f17f0e6da4
@ -26,9 +26,15 @@ static void ParseExtraDirectives(const si::bytearray& p_extra, SceneAnimData& p_
|
||||
p_data.hideOnStop = true;
|
||||
}
|
||||
|
||||
size_t pos = extra.find("PTATCAM=");
|
||||
size_t pos = extra.find("PTATCAM");
|
||||
if (pos != std::string::npos) {
|
||||
pos += 8;
|
||||
pos += 7;
|
||||
// Skip the key-value separator (colon, comma, space, etc. — same set as KeyValueStringParse)
|
||||
if (pos < extra.size() &&
|
||||
(extra[pos] == ':' || extra[pos] == ',' || extra[pos] == ' ' || extra[pos] == '\t' ||
|
||||
extra[pos] == '=')) {
|
||||
pos++;
|
||||
}
|
||||
size_t end = extra.find(' ', pos);
|
||||
std::string value = (end != std::string::npos) ? extra.substr(pos, end - pos) : extra.substr(pos);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user