diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2019-03-13 14:25:47 +0000 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2019-03-13 14:45:28 +0000 |
commit | 58e490fec4909b18151e25bd55c9e9f91512a007 (patch) | |
tree | 4d833261c92299d828663ff51274f44dcf342564 /devices/gdevdsp.c | |
parent | 9da9391c8f0a1414be45201c79e5cc649a125341 (diff) | |
download | ghostpdl-58e490fec4909b18151e25bd55c9e9f91512a007.tar.gz |
Fix (non-PostScript) processing of -d switch with radix
The -d switch can take a radix as part of the value assigned to a
named switch. For example -dDisplayFormat=16#20808 is described in the
display device documentation as selecting CMYK rendering.
The implementation in plmain.c was completely broken and returned the
error "Malformed base value for radix" for any switch using '#'.
The first problem is that we increment the pointer 'v' after checking
'c' to see if its a number. That means when its not a number (ie #) we
have moved v on past the # character. So the test for *v being '#'
fails.
Later we use 'val' which has been initialised to the '#' symbol in the
string. We check to see its a number or A->F or a->f and if its not
then we throw an error. Of course its initially pointing at '#' so
it fails immediately.
Diffstat (limited to 'devices/gdevdsp.c')
0 files changed, 0 insertions, 0 deletions