From 73794de67dff161c7cf9c2506a48a9352210da5d Mon Sep 17 00:00:00 2001 From: Jorg K Date: Tue, 30 May 2017 23:44:00 +0200 Subject: [PATCH] Bug 1353625 - detect zero (0) as invalid resolution. r=bobowen a=tomcat --- widget/nsPrintOptionsImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widget/nsPrintOptionsImpl.cpp b/widget/nsPrintOptionsImpl.cpp index 86037d862c1c..f67f754b87dc 100644 --- a/widget/nsPrintOptionsImpl.cpp +++ b/widget/nsPrintOptionsImpl.cpp @@ -512,7 +512,7 @@ nsPrintOptions::ReadPrefs(nsIPrintSettings* aPS, const nsAString& aPrinterName, // set to the legacy invalid, uninitialized value. We'll just broadly // assume that anything outside of a million DPI is invalid. if (GETINTPREF(kPrintResolution, &iVal) && - (iVal < 0 || iVal > 1000000)) { + (iVal <= 0 || iVal > 1000000)) { height = -1L; width = -1L; }