Browse Source

Fixed a too big alloc in pixmap.

Mark Sibly 9 years ago
parent
commit
d0974cf061
1 changed files with 1 additions and 1 deletions
  1. 1 1
      modules/std/graphics/pixmap.monkey2

+ 1 - 1
modules/std/graphics/pixmap.monkey2

@@ -27,7 +27,7 @@ Class Pixmap
 
 
 		Local depth:=PixelFormatDepth( format )
 		Local depth:=PixelFormatDepth( format )
 		Local pitch:=width*depth
 		Local pitch:=width*depth
-		Local data:=Cast<UByte Ptr>( libc.malloc( width*height*pitch ) )
+		Local data:=Cast<UByte Ptr>( libc.malloc( pitch*height ) )
 		
 		
 		_width=width
 		_width=width
 		_height=height
 		_height=height