aboutsummaryrefslogtreecommitdiffstats
path: root/include/crow/query_string.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/crow/query_string.h')
-rw-r--r--include/crow/query_string.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/crow/query_string.h b/include/crow/query_string.h
index 3f8bffe..edde0f6 100644
--- a/include/crow/query_string.h
+++ b/include/crow/query_string.h
@@ -222,8 +222,12 @@ 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));
- qs_decode(val);
+#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
{