diff options
Diffstat (limited to 'src/Array.cpp')
| -rw-r--r-- | src/Array.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Array.cpp b/src/Array.cpp index a511841..d5d9d7c 100644 --- a/src/Array.cpp +++ b/src/Array.cpp | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include <plist/Array.h> | 22 | #include <plist/Array.h> |
| 23 | 23 | ||
| 24 | #include <algorithm> | 24 | #include <algorithm> |
| 25 | #include <limits.h> | ||
| 25 | 26 | ||
| 26 | namespace PList | 27 | namespace PList |
| 27 | { | 28 | { |
| @@ -118,6 +119,9 @@ void Array::Remove(Node* node) | |||
| 118 | if (node) | 119 | if (node) |
| 119 | { | 120 | { |
| 120 | uint32_t pos = plist_array_get_item_index(node->GetPlist()); | 121 | uint32_t pos = plist_array_get_item_index(node->GetPlist()); |
| 122 | if (pos == UINT_MAX) { | ||
| 123 | return; | ||
| 124 | } | ||
| 121 | plist_array_remove_item(_node, pos); | 125 | plist_array_remove_item(_node, pos); |
| 122 | std::vector<Node*>::iterator it = _array.begin(); | 126 | std::vector<Node*>::iterator it = _array.begin(); |
| 123 | it += pos; | 127 | it += pos; |
