fix(content): isfinite-guard float reads in Quest/Item/Dialogue deser…#399
Conversation
📝 WalkthroughWalkthroughDialogue, item, and quest YAML loaders now sanitize non-finite float inputs. Dialogue editor positions and float properties, item weights and attribute modifiers, and quest time limit and cooldown fields use finite fallbacks or clamping. New tests and CMake entries cover the updated parsing paths. ChangesFinite float validation
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@OloEngine/src/OloEngine/Gameplay/Quest/QuestDatabase.cpp`:
- Around line 16-24: The SanitizeFinite helper is duplicated across multiple
serializers/databases, with the QuestDatabase version matching the ItemDatabase
one except for the log prefix. Consolidate the shared 4-argument SanitizeFinite
logic into a common utility used by QuestDatabase, ItemDatabase, and the
DialogueTreeSerializer wrapper, and pass the prefix as a parameter so only the
wrapper-specific behavior remains in each file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 149de6ba-2765-4596-8997-906a481684d5
📒 Files selected for processing (7)
OloEngine/src/OloEngine/Dialogue/DialogueTreeSerializer.cppOloEngine/src/OloEngine/Gameplay/Inventory/ItemDatabase.cppOloEngine/src/OloEngine/Gameplay/Quest/QuestDatabase.cppOloEngine/tests/CMakeLists.txtOloEngine/tests/DialogueTreeFloatValidationTest.cppOloEngine/tests/ItemDatabaseFloatValidationTest.cppOloEngine/tests/QuestDatabaseFloatValidationTest.cpp
🤖 Self-review (finish-pr) @
|
|



…ializers
Summary by CodeRabbit