Skip to content

Commit 4806cc8

Browse files
author
livecodeali
committed
[[ Bug 15768 ]] Check success of fetching local data correctly
1 parent 30f337e commit 4806cc8

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

docs/lcb/notes/15768.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# LiveCode Builder Standard Library
2+
3+
# [15768] Fix "the local date" on Windows

libscript/src/module-date.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
3333
// so do a bit of gymnastics to make the signature correct.
3434
inline struct tm *localtime_r(const time_t *p_time, struct tm *r_timeinfo)
3535
{
36-
if (localtime_s(r_timeinfo, p_time) != 0)
36+
if (localtime_s(r_timeinfo, p_time) == 0)
3737
return r_timeinfo;
3838

3939
return NULL;

0 commit comments

Comments
 (0)