mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-09-22 11:35:49 -04:00
Update json_value.cpp
This commit is contained in:
parent
0707eefd55
commit
3345a5cf86
@ -1401,7 +1401,7 @@ void Value::Comments::set(CommentPlacement slot, String comment) {
|
||||
if (!ptr_) {
|
||||
ptr_ = std::unique_ptr<Array>(new Array());
|
||||
}
|
||||
// check comments array boundary.
|
||||
|
||||
if (slot < CommentPlacement::numberOfCommentPlacement) {
|
||||
(*ptr_)[slot] = std::move(comment);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user