summaryrefslogtreecommitdiffstats
path: root/rc.cc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-01-23 05:54:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-01-23 05:54:09 +0000
commitb95f39dfdb659097af23465ec2a533a254fd4ac5 (patch)
treec706cd4227ea65ece171824e07a2f5cf98a291b0 /rc.cc
parentAdding upstream version 1.12. (diff)
downloadzutils-b95f39dfdb659097af23465ec2a533a254fd4ac5.tar.xz
zutils-b95f39dfdb659097af23465ec2a533a254fd4ac5.zip
Adding upstream version 1.13~rc1.upstream/1.13_rc1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'rc.cc')
-rw-r--r--rc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/rc.cc b/rc.cc
index 5a5c5b4..b671200 100644
--- a/rc.cc
+++ b/rc.cc
@@ -46,7 +46,7 @@ std::string compressor_names[num_formats] =
std::vector< std::string > compressor_args[num_formats];
// vector of enabled formats plus [num_formats] for uncompressed.
-// empty means all enabled.
+// empty or incomplete (size <= num_formats) means all enabled.
std::vector< bool > enabled_formats;
const struct { const char * from; const char * to; int format_index; }
@@ -292,7 +292,7 @@ int extension_format( const int eindex )
{ return ( eindex >= 0 ) ? known_extensions[eindex].format_index : -1; }
const char * extension_from( const int eindex )
- { return known_extensions[eindex].from; }
+ { return ( eindex >= 0 ) ? known_extensions[eindex].from : ""; }
const char * extension_to( const int eindex )
{ return known_extensions[eindex].to; }