[librsvg/rustify-rsvg-convert: 2/2] rsvg-convert: error out if either width or height is 0
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustify-rsvg-convert: 2/2] rsvg-convert: error out if either width or height is 0
- Date: Sat, 9 Jan 2021 16:32:51 +0000 (UTC)
commit 9b496b8313af4ab34f318e57674ec785e888e682
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]