mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
Merge pull request #183 from philave/vs2015-compilation-fix
MS VS2015 compilation fix.
This commit is contained in:
commit
c32aae4b5f
@ -1394,7 +1394,12 @@ namespace crow
|
||||
case type::Number:
|
||||
{
|
||||
char outbuf[128];
|
||||
#ifdef _MSC_VER
|
||||
sprintf_s(outbuf, 128, "%g", v.d);
|
||||
#else
|
||||
sprintf(outbuf, "%g", v.d);
|
||||
#endif
|
||||
|
||||
out += outbuf;
|
||||
}
|
||||
break;
|
||||
|
@ -266,7 +266,11 @@ inline char * qs_scanvalue(const char * key, const char * qs, char * val, size_t
|
||||
{
|
||||
qs++;
|
||||
i = strcspn(qs, "&=#");
|
||||
strncpy(val, qs, (val_len-1)<(i+1) ? (val_len-1) : (i+1));
|
||||
#ifdef _MSC_VER
|
||||
strncpy_s(val, val_len, qs, (val_len - 1)<(i + 1) ? (val_len - 1) : (i + 1));
|
||||
#else
|
||||
strncpy(val, qs, (val_len - 1)<(i + 1) ? (val_len - 1) : (i + 1));
|
||||
#endif
|
||||
qs_decode(val);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user