Explorar o código

Allow calls to readState without a predefined exists hash

Zachary Kotlarek %!s(int64=13) %!d(string=hai) anos
pai
achega
7b8461bf8b
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      dmx/DMX.pm

+ 4 - 0
dmx/DMX.pm

@@ -98,6 +98,10 @@ sub parseState($$$) {
 	my ($text, $exists, $mtime) = @_;
 	my $cmdState    = undef();
 	my $exists_text = undef();
+	if (!defined($exists)) {
+		my %tmp = ();
+		$exists  = \%tmp;
+	}
 	if (!defined($mtime)) {
 		my %tmp = ();
 		$mtime  = \%tmp;