diff --git a/HexFiend/HFTextRepresenter.m b/HexFiend/HFTextRepresenter.m index edc35154..276e0cb5 100644 --- a/HexFiend/HFTextRepresenter.m +++ b/HexFiend/HFTextRepresenter.m @@ -86,7 +86,7 @@ HFASSERT(byteRange.length > 0); HFRange displayedRange = [self entireDisplayedRange]; HFRange intersection = HFIntersectionRange(displayedRange, byteRange); - NSRect result; + NSRect result = {{0,},}; if (intersection.length > 0) { NSRange intersectionNSRange = NSMakeRange(ll2l(intersection.location - displayedRange.location), ll2l(intersection.length)); if (intersectionNSRange.length > 0) { diff --git a/Makefile b/Makefile index ffe52cc7..8b21e45a 100755 --- a/Makefile +++ b/Makefile @@ -46,8 +46,9 @@ LDFLAGS += -lc -lm endif ifeq ($(PLATFORM),Darwin) +SYSROOT := $(shell xcodebuild -sdk macosx -version Path 2> /dev/null) CFLAGS += -F/Library/Frameworks -OCFLAGS += -x objective-c -fobjc-arc -Wno-deprecated-declarations -isysroot $(shell xcode-select -p)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk -mmacosx-version-min=10.9 +OCFLAGS += -x objective-c -fobjc-arc -Wno-deprecated-declarations -isysroot $(SYSROOT) -mmacosx-version-min=10.9 LDFLAGS += -framework AppKit -framework Carbon -framework QuartzCore SDL_LDFLAGS := -framework SDL endif