From d4162bb3114ed587e9219f34133556f50ce24cef Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sun, 3 Apr 2022 18:15:36 +0000 Subject: Fix incorrect output file name for PAM input git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4322 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pamdice.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'editor') diff --git a/editor/pamdice.c b/editor/pamdice.c index 9063c4bd..58e24e5b 100644 --- a/editor/pamdice.c +++ b/editor/pamdice.c @@ -227,12 +227,14 @@ computeOutputFilenameFormat(int const format, const char * filenameSuffix; - switch(PNM_FORMAT_TYPE(format)) { + switch(PAM_FORMAT_TYPE(format)) { case PPM_TYPE: filenameSuffix = "ppm"; break; case PGM_TYPE: filenameSuffix = "pgm"; break; case PBM_TYPE: filenameSuffix = "pbm"; break; case PAM_TYPE: filenameSuffix = "pam"; break; - default: filenameSuffix = ""; break; + default: + pm_error("INTERNAL ERROR: impossible value for libnetpbm image " + "fomat code: %d", format); } pm_asprintf(filenameFormatP, "%%s_%%0%uu_%%0%uu.%s", -- cgit 1.4.1