diff options
| author | fusion32 <marcopuzziello@gmail.com> | 2025-10-18 03:40:40 -0300 |
|---|---|---|
| committer | fusion32 <marcopuzziello@gmail.com> | 2025-10-18 03:40:40 -0300 |
| commit | ebf536a7910f6e8d5bff569d2d717287ad3ba716 (patch) | |
| tree | 3033c280b90ddcd1ebe067d840cce94eb8c3566a /src/querymanager.cc | |
| parent | 601ce32ee8d0cee32b66c87b0bfefa7424a5b8c8 (diff) | |
| download | querymanager-ebf536a7910f6e8d5bff569d2d717287ad3ba716.tar.gz querymanager-ebf536a7910f6e8d5bff569d2d717287ad3ba716.zip | |
properly handle NULL values with postgres result helpers
Diffstat (limited to 'src/querymanager.cc')
| -rw-r--r-- | src/querymanager.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/querymanager.cc b/src/querymanager.cc index 983e65f..56df1f8 100644 --- a/src/querymanager.cc +++ b/src/querymanager.cc @@ -243,9 +243,9 @@ bool StringFormatTime(char *Dest, int DestCapacity, const char *Format, int Time struct tm tm = GetLocalTime((int)Timestamp); int Result = (int)strftime(Dest, DestCapacity, Format, &tm); - // NOTE(fusion): `strftime` will should return ZERO if it's unable to fit - // the result in the supplied buffer, which is annoying because ZERO may - // not represent a failure if the result is an empty string. + // NOTE(fusion): `strftime` will return ZERO if it's unable to fit the result + // in the supplied buffer, which is annoying because ZERO may not represent a + // failure if the result is an empty string. ASSERT(Result >= 0 && Result < DestCapacity); if(Result == 0){ memset(Dest, 0, DestCapacity); |
