We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 065899d commit c6bbad8Copy full SHA for c6bbad8
drogon_ctl/templates/model_cc.csp
@@ -1539,14 +1539,14 @@ if(!col.notNull_){%>
1539
if(col.colType_ == "std::string" && col.colLength_>0)
1540
{
1541
%>
1542
- if(pJson.isString() && std::strlen(pJson.asCString()) > {%col.colLength_%})
+ if(pJson.isString() && std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>, wchar_t>{}
1543
+ .from_bytes(pJson.asCString()).size() > {%col.colLength_%})
1544
1545
err="String length exceeds limit for the " +
1546
fieldName +
1547
" field (the maximum value is {%col.colLength_%})";
1548
return false;
1549
}
-
1550
<%c++
1551
1552
0 commit comments