Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Leak fix #7

Merged
merged 2 commits into from

3 participants

@mikeabdullah

No description provided.

@alexzielenski alexzielenski merged commit 579c096 into alexzielenski:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 16, 2012
  1. @mikeabdullah

    leak fix

    mikeabdullah authored
Commits on Jul 19, 2012
  1. @samdeane
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 6 deletions.
  1. +6 −6 ICOFamily.m
View
12 ICOFamily.m
@@ -75,7 +75,7 @@ @implementation ICOFamily
#pragma mark Initializers
- init {
if ((self = [super init])) {
- self.elements=[[NSMutableDictionary alloc] init];
+ elements=[[NSMutableDictionary alloc] init];
}
return self;
}
@@ -347,8 +347,8 @@ - (NSData*)data {
BitMapInfoHeader bitmapHeader;
IconDirEntry entryHeader;
- uint32_t bmpSize = currentRep.pixelsHigh * currentRep.bytesPerRow;
- uint32_t andSize = ((((currentRep.pixelsWide) + 31) >> 5) << 2);
+ uint32_t bmpSize = (uint32_t) (currentRep.pixelsHigh * currentRep.bytesPerRow);
+ uint32_t andSize = (uint32_t) ((((currentRep.pixelsWide) + 31) >> 5) << 2);
vImage_Buffer bmpBuf;
vImage_Buffer tmpBuf;
@@ -375,8 +375,8 @@ - (NSData*)data {
// Initialize the ICO bitmap header
bitmapHeader.biSize = 40; // 40 byte header
- bitmapHeader.biWidth = currentRep.pixelsWide;
- bitmapHeader.biHeight = currentRep.pixelsHigh * 2; // double height due to and map
+ bitmapHeader.biWidth = (int32_t) currentRep.pixelsWide;
+ bitmapHeader.biHeight = (int32_t) currentRep.pixelsHigh * 2; // double height due to and map
bitmapHeader.biPlanes = 1;
bitmapHeader.biBitCount = currentRep.bitsPerPixel;
bitmapHeader.biCompression = 0;
@@ -394,7 +394,7 @@ - (NSData*)data {
entryHeader.wPlanes = currentRep.numberOfPlanes; // must be 1
entryHeader.wBitCount = currentRep.bitsPerPixel; // must be 32
entryHeader.dwBytesInRes = bitmapHeader.biSizeImage + 40;
- entryHeader.dwImageOffset = 16 * elements.count+images.length+data.length;
+ entryHeader.dwImageOffset = (int32_t) (16 * elements.count+images.length+data.length);
// "Write" the ICO header data
[headers appendLEUInt8:entryHeader.bWidth];
Something went wrong with that request. Please try again.