There was an error while loading. Please reload this page.
1 parent a182cd5 commit c0f4ddaCopy full SHA for c0f4dda
1 file changed
src/rhea/core/DynamicObject.cpp
@@ -270,7 +270,7 @@ std::string DynamicObject::toString() {
270
if(dotPos != std::string::npos) {
271
numstr.erase(numstr.find_last_not_of('0') + 1);
272
273
- if(numstr.back() == '.')
+ if(!numstr.empty() && numstr.back() == '.')
274
numstr.pop_back();
275
}
276
@@ -489,9 +489,8 @@ DynamicObject operator-(
489
490
491
size_t index = 0;
492
- while((index = subject.find(subject, index)) != std::string::npos) {
493
- subject.replace(index, rightVal.size(), "");
494
- index++;
+ while((index = subject.find(object, index)) != std::string::npos) {
+ subject.replace(index, object.size(), "");
495
496
497
return DynamicObject(subject);
0 commit comments