aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fakecanvas.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/fakecanvas.lua b/fakecanvas.lua
index e5cb7b4..77466a2 100644
--- a/fakecanvas.lua
+++ b/fakecanvas.lua
@@ -111,8 +111,8 @@ local function Canvas (width, height)
w = math.min(sw, tonumber(width) or sw)
h = math.min(sh, tonumber(height) or sh)
else -- well that sucks
- w = math.min(prevpo2(sw), nextpo2(tonumber(width) or 1))
- h = math.min(prevpo2(sh), nextpo2(tonumber(height) or 1))
+ w = math.max(prevpo2(sw), nextpo2(tonumber(width) or 1))
+ h = math.max(prevpo2(sh), nextpo2(tonumber(height) or 1))
end
c._imagedata = love.image.newImageData(w, h)