diff options
author | Thomas White <taw@bitwiz.org.uk> | 2015-02-24 13:14:02 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.org.uk> | 2015-02-24 13:14:02 +0100 |
commit | 974c5bc404f8b7f77d66a38ef0fcd0d3b990043d (patch) | |
tree | 589226740e52b91e892c2d5855c2d2957cb4491f /src | |
parent | 11cf54695fbe47d96325392a4b1323bc16da7032 (diff) |
Fix image import size
Diffstat (limited to 'src')
-rw-r--r-- | src/sc_editor.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/sc_editor.c b/src/sc_editor.c index f2bdbf5..1736b47 100644 --- a/src/sc_editor.c +++ b/src/sc_editor.c @@ -1202,9 +1202,10 @@ static void check_import_size(SCEditor *e) int new_import_width; new_import_width = e->w/2; - e->import_height = (new_import_width *e->import_height) - / e->w; + e->import_height = (new_import_width * e->import_height) / + e->import_width; e->import_width = new_import_width; + } if ( e->import_height > e->h ) { @@ -1212,9 +1213,10 @@ static void check_import_size(SCEditor *e) int new_import_height; new_import_height = e->w/2; - e->import_width = (new_import_height*e->import_width) - / e->import_height; + e->import_width = (new_import_height*e->import_width) / + e->import_height; e->import_height = new_import_height; + } } |