summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXDraw.c
diff options
context:
space:
mode:
authordas <das>2006-03-28 02:43:23 (GMT)
committerdas <das>2006-03-28 02:43:23 (GMT)
commita8319e4b09026b7ec6048d671b1dbe3c4b16bfa8 (patch)
treeedafaa2027b02c815d7f8c0687d4f95f2b0e8f00 /macosx/tkMacOSXDraw.c
parentca9ecb062779adb867952800741659c84efb49bb (diff)
downloadtk-a8319e4b09026b7ec6048d671b1dbe3c4b16bfa8.zip
tk-a8319e4b09026b7ec6048d671b1dbe3c4b16bfa8.tar.gz
tk-a8319e4b09026b7ec6048d671b1dbe3c4b16bfa8.tar.bz2
* macosx/tkMacOSXDraw.c: sync whitespace & minor changes
* macosx/tkMacOSXEvent.h: with core-8-4-branch. * macosx/tkMacOSXFont.h: * macosx/tkMacOSXMenu.c: * macosx/tkMacOSXNotify.c:
Diffstat (limited to 'macosx/tkMacOSXDraw.c')
-rw-r--r--macosx/tkMacOSXDraw.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/macosx/tkMacOSXDraw.c b/macosx/tkMacOSXDraw.c
index 0e38e90..51dc8cb 100644
--- a/macosx/tkMacOSXDraw.c
+++ b/macosx/tkMacOSXDraw.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.12 2006/03/25 06:08:16 das Exp $
+ * RCS: @(#) $Id: tkMacOSXDraw.c,v 1.13 2006/03/28 02:43:24 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -425,7 +425,7 @@ TkPutImage(
if ((image->bytes_per_line % 2) == 1) {
char *newPtr, *oldPtr;
newData = (char *) ckalloc(image->height *
- (image->bytes_per_line + 1));
+ (image->bytes_per_line + 1));
newPtr = newData;
oldPtr = image->data;
for (i = 0; i < image->height; i++) {
@@ -439,8 +439,9 @@ TkPutImage(
bitmap.baseAddr = newData;
bitmap.rowBytes = image->bytes_per_line + 1;
} else {
- newData = (char *) ckalloc(image->height * image->bytes_per_line);
- for (i = 0; i < image->height * image->bytes_per_line; i++) {
+ size_t size = image->height * image->bytes_per_line;
+ newData = (char *) ckalloc((int) size);
+ for (i = 0; i < size; i++) {
newData[i] = InvertByte((unsigned char) image->data[i]);
}
bitmap.baseAddr = newData;