about summary refs log tree commit diff
path: root/editor/pnmquantall
diff options
context:
space:
mode:
Diffstat (limited to 'editor/pnmquantall')
-rwxr-xr-xeditor/pnmquantall5
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/pnmquantall b/editor/pnmquantall
index 80d00fce..5f434fc2 100755
--- a/editor/pnmquantall
+++ b/editor/pnmquantall
@@ -117,16 +117,17 @@ sub parseArgs($$$$) {
 
 sub tempFile($) {
 
+    my ($suffix) = @_;
+
     # We trust Perl's File::Temp to do a better job of creating the temp
     # file, but it doesn't exist before Perl 5.6.1.
 
     if (eval { require File::Temp; 1 }) {
         return File::Temp::tempfile("pnmquant_XXXX", 
-                                    SUFFIX=>".pnm", 
+                                    SUFFIX=>$suffix, 
                                     DIR=>File::Spec->tmpdir(),
                                     UNLINK=>$TRUE);
     } else {
-        my ($suffix) = @_;
         my $fileName;
         local *file;  # For some inexplicable reason, must be local, not my
         my $i;