aboutsummaryrefslogtreecommitdiff
path: root/src/querymanager.cc
diff options
context:
space:
mode:
authorfusion32 <marcopuzziello@gmail.com>2025-10-18 03:40:40 -0300
committerfusion32 <marcopuzziello@gmail.com>2025-10-18 03:40:40 -0300
commitebf536a7910f6e8d5bff569d2d717287ad3ba716 (patch)
tree3033c280b90ddcd1ebe067d840cce94eb8c3566a /src/querymanager.cc
parent601ce32ee8d0cee32b66c87b0bfefa7424a5b8c8 (diff)
downloadquerymanager-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.cc6
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);