Skip to content

Commit 5b4b391

Browse files
committed
Try %18lld to avoid gcc specific format string
1 parent 44abaa8 commit 5b4b391

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

table.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ void table_t::escape_type(const string &value, ColumnType flags)
459459
// For integers we take the first number, or the average if it's a-b
460460
long long from, to;
461461
// limit number of digits parsed to avoid undefined behaviour in sscanf
462-
int items = sscanf(value.c_str(), "%18Ld-%18Ld", &from, &to);
462+
int items = sscanf(value.c_str(), "%18lld-%18lld", &from, &to);
463463
if (items == 1 && from <= std::numeric_limits<int32_t>::max() &&
464464
from >= std::numeric_limits<int32_t>::min()) {
465465
m_copy.add_column(from);

0 commit comments

Comments
 (0)