Skip to content

Commit

Permalink
again?
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Jul 11, 2023
1 parent f4425c5 commit 4a0e939
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions c/driver/sqlite/statement_reader.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,17 +149,20 @@ static const char* ArrowTimestampToIsoString(int64_t value, enum ArrowTimeUnit u
break;
case NANOARROW_TIME_UNIT_MILLI:
tsstr[19] = '.';
assert(rem > 0);
assert(rem >= 0);
assert(rem < scale);
snprintf(tsstr + 20, strlen - 20, "%03d", rem);
break;
case NANOARROW_TIME_UNIT_MICRO:
tsstr[19] = '.';
assert(rem > 0);
assert(rem >= 0);
assert(rem < scale);
snprintf(tsstr + 20, strlen - 20, "%06d", rem);
break;
case NANOARROW_TIME_UNIT_NANO:
tsstr[19] = '.';
assert(rem > 0);
assert(rem >= 0);
assert(rem < scale);
snprintf(tsstr + 20, strlen - 20, "%09d", rem);
break;
}
Expand Down

0 comments on commit 4a0e939

Please sign in to comment.