[librsvg/rustify-rsvg-convert] rsvg-convert: error out if either width or height is 0



commit cf8cce85d81acab141bc88058b8a1b27bc8ceeb7
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Jan 9 16:08:47 2021 +0100

    rsvg-convert: error out if either width or height is 0

 src/bin/rsvg-convert/main.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/bin/rsvg-convert/main.rs b/src/bin/rsvg-convert/main.rs
index 84d0a5f8..1f29ad93 100644
--- a/src/bin/rsvg-convert/main.rs
+++ b/src/bin/rsvg-convert/main.rs
@@ -47,7 +47,7 @@ enum ResizeStrategy {
 
 impl ResizeStrategy {
     pub fn apply(self, input: Size, keep_aspect_ratio: bool) -> Result<Size, ()> {
-        if input.w == 0.0 && input.h == 0.0 {
+        if input.w == 0.0 || input.h == 0.0 {
             return Err(());
         }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]