# HG changeset patch # User nkeynes # Date 1226044411 0 # Node ID 2146dd5529fdad108574e59de4a72ecbe627fd44 # Parent 6fbba9e715160a072ce3b1e1d3459c8c9440421d Fix "0" being confused with "not defined" --- a/src/drivers/genkeymap.pl Fri Nov 07 07:39:52 2008 +0000 +++ b/src/drivers/genkeymap.pl Fri Nov 07 07:53:31 2008 +0000 @@ -27,7 +27,7 @@ print "const gchar *${name}_keysyms_by_keycode[128] = { "; for( $i=0; $i < 128; $i++ ) { if( $i != 0 ) { print ", "; } - if( $hash{$i} ) { + if( defined($hash{$i}) ) { print "\"$hash{$i}\""; } else { print "NULL"; @@ -38,7 +38,7 @@ print "const uint16_t ${name}_keycode_to_dckeysym[128] = { "; for( $i=0; $i<128; $i++ ) { if( $i != 0 ) { print ", "; } - if( $hash{$i} && $dcsyms{$hash{$i}} ) { + if( defined($hash{$i}) && $dcsyms{$hash{$i}} ) { print $dcsyms{$hash{$i}}; } else { print "DCKB_NONE";