From d5406cbc554411327e5a4438f490ee137ba3c5ee Mon Sep 17 00:00:00 2001 From: David Capello Date: Wed, 17 May 2023 12:36:17 -0300 Subject: [PATCH] Fix bug reading UUID property from backup data/undo data --- src/doc/user_data_io.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/doc/user_data_io.cpp b/src/doc/user_data_io.cpp index 49b67451b..575b71465 100644 --- a/src/doc/user_data_io.cpp +++ b/src/doc/user_data_io.cpp @@ -117,6 +117,7 @@ static void write_property_value(std::ostream& os, const UserData::Variant& vari for (int i=0; i<16; ++i) { write8(os, uuid[i]); } + break; } } } @@ -236,7 +237,7 @@ static UserData::Variant read_property_value(std::istream& is, uint16_t type) case USER_DATA_PROPERTY_TYPE_UUID: { base::Uuid value; uint8_t* bytes = value.bytes(); - for (int i; i<16;++i) { + for (int i=0; i<16; ++i) { bytes[i] = read8(is); } return value;