Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions drogon_ctl/templates/model_cc.csp
Original file line number Diff line number Diff line change
Expand Up @@ -1539,14 +1539,14 @@ if(!col.notNull_){%>
if(col.colType_ == "std::string" && col.colLength_>0)
{
%>
if(pJson.isString() && std::strlen(pJson.asCString()) > {%col.colLength_%})
if(pJson.isString() && std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t>{}
.from_bytes(pJson.asCString()).size() > {%col.colLength_%})
{
err="String length exceeds limit for the " +
fieldName +
" field (the maximum value is {%col.colLength_%})";
return false;
}

<%c++
}
}
Expand Down
Loading