Explorar el Código

Only warn about invalid states when debugging

Zachary Kotlarek hace 13 años
padre
commit
92f81341d2
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      dmx/DMX.pm

+ 3 - 1
dmx/DMX.pm

@@ -245,7 +245,9 @@ sub readState($$$$) {
 			# Ignore invalid states
 			if (defined($valid)) {
 				if (!defined($valid->{$state})) {
-					print STDERR 'Invalid state: ' . $state . "\n";
+					if ($DEBUG) {
+						print STDERR 'Invalid state: ' . $state . "\n";
+					}
 					next;
 				}
 			}