diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h index 5b622f78b..26ae94748 100644 --- a/include/rapidjson/schema.h +++ b/include/rapidjson/schema.h @@ -1149,7 +1149,7 @@ class Schema { #elif RAPIDJSON_SCHEMA_USE_STDREGEX template RegexType* CreatePattern(const ValueType& value) { - if (value.IsString()) + if (value.IsString()) { RegexType *r = static_cast(allocator_->Malloc(sizeof(RegexType))); try { return new (r) RegexType(value.GetString(), std::size_t(value.GetStringLength()), std::regex_constants::ECMAScript); @@ -1157,6 +1157,7 @@ class Schema { catch (const std::regex_error&) { AllocatorType::Free(r); } + } return 0; }