GUACAMOLE-295: Fix an incorrect comparison with NaN.

This commit is contained in:
Chris Gavin
2017-05-07 11:04:12 +01:00
parent 7fd7035a47
commit c4dfd9626b

View File

@@ -121,7 +121,7 @@ Guacamole.Parser = function() {
// Parse length
var length = parseInt(buffer.substring(element_end+1, length_end));
if (length == NaN)
if (isNaN(length))
throw new Error("Non-numeric character in element length.");
// Calculate start of element