aboutsummaryrefslogtreecommitdiff
path: root/common/str.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/str.h')
-rw-r--r--common/str.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/str.h b/common/str.h
index 12e2b0d2d3..74bcb42264 100644
--- a/common/str.h
+++ b/common/str.h
@@ -222,6 +222,12 @@ public:
typedef const char * const_iterator;
iterator begin() {
+ // Since the user could potentionally
+ // change the string via the returned
+ // iterator we have to assure we are
+ // pointing to an unique storage.
+ makeUnique();
+
return _str;
}