[librsvg/rustify-rsvg-convert: 45/78] rsvg-convert: error out if either width or height is 0
- From: Sven Neumann <sneumann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustify-rsvg-convert: 45/78] rsvg-convert: error out if either width or height is 0
- Date: Wed, 3 Feb 2021 10:18:30 +0000 (UTC)
commit f76a175d55c7eba84927197c128b4d176862a9b4
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 c66e593c..91e9b18a 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]