summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/strgen/strgen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp
index 606f82518..85b83f2b5 100644
--- a/src/strgen/strgen.cpp
+++ b/src/strgen/strgen.cpp
@@ -124,7 +124,7 @@ struct FileStringReader : StringReader {
/* virtual */ char *ReadLine(char *buffer, const char *last)
{
- return fgets(buffer, last - buffer + 1, this->fh);
+ return fgets(buffer, ClampToU16(last - buffer + 1), this->fh);
}
/* virtual */ void HandlePragma(char *str);