diff options
Diffstat (limited to 'base/gp_wgetv.c')
-rw-r--r-- | base/gp_wgetv.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/base/gp_wgetv.c b/base/gp_wgetv.c index 72f65825..0f634214 100644 --- a/base/gp_wgetv.c +++ b/base/gp_wgetv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2019 Artifex Software, Inc. +/* Copyright (C) 2001-2020 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -157,11 +157,13 @@ gp_getenv(const char *name, char *ptr, int *plen) && ((HIWORD(version) & 0x4000) == 0))) { /* not Win32s */ int code; + int major = (int)(gs_revision / 1000); + int minor = (int)(gs_revision - (major * 1000)) / 10; + int patch = gs_revision % 10; wchar_t key[256]; wchar_t dotversion[16]; - wsprintfW(dotversion, L"%d.%02d", (int)(gs_revision / 100), - (int)(gs_revision % 100)); + wsprintfW(dotversion, L"%d.%02d.%d", major, minor, patch); wsprintfW(key, L"Software\\%hs\\%s", gs_productfamily, dotversion); code = gp_getenv_registry(HKEY_CURRENT_USER, key, name, ptr, plen); if ( code <= 0 ) |