diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-09-10 18:10:49 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-09-11 20:06:36 +0200 |
commit | acfc02c1747065fe450c7cfeb6f1844b62335f08 (patch) | |
tree | 5887806a2e6b99bbb0255e013a9028810e230a7f /base/gp_wgetv.c | |
parent | Import Ghostscript 9.52 (diff) | |
download | ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.gz ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.tar.bz2 ghostscript-gpl-patches-acfc02c1747065fe450c7cfeb6f1844b62335f08.zip |
Import Ghostscript 9.53ghostscript-9.53
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
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 ) |