about summary refs log tree commit diff
path: root/converter
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-06-01 19:13:19 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2013-06-01 19:13:19 +0000
commit0343f6d0ab7ea01660189a79ad0953128a533d2f (patch)
tree9e7353d30a9353e0255561ae3489d8eb9d25cecb /converter
parentc7ecefa5ffafb15c6163104e5de06cbdd47a2528 (diff)
downloadnetpbm-mirror-0343f6d0ab7ea01660189a79ad0953128a533d2f.tar.gz
netpbm-mirror-0343f6d0ab7ea01660189a79ad0953128a533d2f.tar.xz
netpbm-mirror-0343f6d0ab7ea01660189a79ad0953128a533d2f.zip
Fix bug: does not read the color dictionary with 'mustopen' when user explicitly names the color dictionary file with -rgb
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1919 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'converter')
-rw-r--r--converter/ppm/ppmtoxpm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/converter/ppm/ppmtoxpm.c b/converter/ppm/ppmtoxpm.c
index ff47359b..38d99972 100644
--- a/converter/ppm/ppmtoxpm.c
+++ b/converter/ppm/ppmtoxpm.c
@@ -636,8 +636,10 @@ main(int argc, char *argv[]) {
 
     if (cmdline.hexonly)
         colornameHash = NULL;
+    else if (cmdline.rgb)
+        ppm_readcolornamefile(cmdline.rgb, TRUE, &colornameHash, &colornames);
     else
-        ppm_readcolornamefile(cmdline.rgb, FALSE, &colornameHash, &colornames);
+        ppm_readcolornamefile(NULL, FALSE, &colornameHash, &colornames);
 
     /* Now generate the character-pixel colormap table. */
     genCmap(chv, ncolors, maxval,