Skip to content
This repository
Browse code

Merge pull request #143 from claybridges/infinite-loop-etc

Fixed possible infinite loop in -[AQGridViewData indicesOfCellsInRect:], update project files
  • Loading branch information...
commit e8f9358b549577e920ad671bc86ec9eaad590a20 2 parents 685415c + 387d399
Evadne Wu authored
3  .gitignore
@@ -8,4 +8,5 @@ build
8 8 *.perspectivev3
9 9 *.pbxuser
10 10 *.xcuserdatad
11   -*.xcworkspacedata
  11 +xcuserdata/
  12 +project.xcworkspace/
15 AQGridView.xcodeproj/project.xcworkspace/contents.xcworkspacedata
... ... @@ -1,15 +0,0 @@
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<Workspace>
3   - <FileRef
4   - location = "self:AQGridView.xcodeproj">
5   - </FileRef>
6   - <FileRef
7   - location = "container:../Examples/SpringBoard/SpringBoard.xcodeproj">
8   - </FileRef>
9   - <FileRef
10   - location = "container:../Examples/ImageDemo/ImageDemo.xcodeproj">
11   - </FileRef>
12   - <FileRef
13   - location = "absolute:/Users/jim/Documents/Development/Quatermain/AQGridView/Examples/ExpanderDemo/ExpanderDemo.xcodeproj">
14   - </FileRef>
15   -</Workspace>
58 AQGridView.xcodeproj/xcshareddata/xcschemes/AQGridView.xcscheme
... ... @@ -0,0 +1,58 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + version = "1.3">
  4 + <BuildAction
  5 + parallelizeBuildables = "YES"
  6 + buildImplicitDependencies = "YES">
  7 + <BuildActionEntries>
  8 + <BuildActionEntry
  9 + buildForTesting = "YES"
  10 + buildForRunning = "YES"
  11 + buildForProfiling = "YES"
  12 + buildForArchiving = "YES"
  13 + buildForAnalyzing = "YES">
  14 + <BuildableReference
  15 + BuildableIdentifier = "primary"
  16 + BlueprintIdentifier = "D2AAC07D0554694100DB518D"
  17 + BuildableName = "libAQGridView.a"
  18 + BlueprintName = "AQGridView"
  19 + ReferencedContainer = "container:AQGridView.xcodeproj">
  20 + </BuildableReference>
  21 + </BuildActionEntry>
  22 + </BuildActionEntries>
  23 + </BuildAction>
  24 + <TestAction
  25 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  26 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  27 + shouldUseLaunchSchemeArgsEnv = "YES"
  28 + buildConfiguration = "Debug">
  29 + <Testables>
  30 + </Testables>
  31 + </TestAction>
  32 + <LaunchAction
  33 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  34 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  35 + launchStyle = "0"
  36 + useCustomWorkingDirectory = "NO"
  37 + buildConfiguration = "Debug"
  38 + ignoresPersistentStateOnLaunch = "NO"
  39 + debugDocumentVersioning = "YES"
  40 + allowLocationSimulation = "YES">
  41 + <AdditionalOptions>
  42 + </AdditionalOptions>
  43 + </LaunchAction>
  44 + <ProfileAction
  45 + shouldUseLaunchSchemeArgsEnv = "YES"
  46 + savedToolIdentifier = ""
  47 + useCustomWorkingDirectory = "NO"
  48 + buildConfiguration = "Release"
  49 + debugDocumentVersioning = "YES">
  50 + </ProfileAction>
  51 + <AnalyzeAction
  52 + buildConfiguration = "Debug">
  53 + </AnalyzeAction>
  54 + <ArchiveAction
  55 + buildConfiguration = "Release"
  56 + revealArchiveInOrganizer = "YES">
  57 + </ArchiveAction>
  58 +</Scheme>
16 AQGridView.xcworkspace/contents.xcworkspacedata
... ... @@ -0,0 +1,16 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Workspace
  3 + version = "1.0">
  4 + <FileRef
  5 + location = "group:AQGridView.xcodeproj">
  6 + </FileRef>
  7 + <FileRef
  8 + location = "group:Examples/SpringBoard/SpringBoard.xcodeproj">
  9 + </FileRef>
  10 + <FileRef
  11 + location = "group:Examples/ImageDemo/ImageDemo.xcodeproj">
  12 + </FileRef>
  13 + <FileRef
  14 + location = "group:Examples/ExpanderDemo/ExpanderDemo.xcodeproj">
  15 + </FileRef>
  16 +</Workspace>
4 Classes/AQGridViewData.m
@@ -210,7 +210,9 @@ - (NSIndexSet *) indicesOfCellsInRect: (CGRect) aRect
210 210 {
211 211 CGRect cellRect = [self cellRectAtIndex: i];
212 212
213   - if ( CGRectGetMaxY(cellRect) < CGRectGetMinY(aRect) )
  213 + // numPerRow must be > 0 or you get an infinite loop
  214 + // (i becomes 0 - 1 => UINT_MAX; loop UINT_MAX+1 => 0, etc.)
  215 + if ( CGRectGetMaxY(cellRect) < CGRectGetMinY(aRect) && numPerRow > 0 )
214 216 {
215 217 // jump forward to the next row
216 218 i += (numPerRow - 1);
3  Examples/ExpanderDemo/ExpanderDemo.xcodeproj/project.pbxproj
@@ -319,6 +319,7 @@
319 319 38D6F05C12197E62006909B6 /* Project object */ = {
320 320 isa = PBXProject;
321 321 attributes = {
  322 + LastUpgradeCheck = 0430;
322 323 ORGANIZATIONNAME = "Kobo Inc.";
323 324 };
324 325 buildConfigurationList = 38D6F05F12197E62006909B6 /* Build configuration list for PBXProject "ExpanderDemo" */;
@@ -435,7 +436,6 @@
435 436 GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
436 437 GCC_WARN_ABOUT_RETURN_TYPE = YES;
437 438 GCC_WARN_UNUSED_VARIABLE = YES;
438   - PREBINDING = NO;
439 439 SDKROOT = iphoneos;
440 440 TARGETED_DEVICE_FAMILY = 2;
441 441 };
@@ -450,7 +450,6 @@
450 450 GCC_WARN_ABOUT_RETURN_TYPE = YES;
451 451 GCC_WARN_UNUSED_VARIABLE = YES;
452 452 OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
453   - PREBINDING = NO;
454 453 SDKROOT = iphoneos;
455 454 TARGETED_DEVICE_FAMILY = 2;
456 455 };
85 Examples/ExpanderDemo/ExpanderDemo.xcodeproj/xcshareddata/xcschemes/ExpanderDemo.xcscheme
... ... @@ -0,0 +1,85 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + version = "1.3">
  4 + <BuildAction
  5 + parallelizeBuildables = "YES"
  6 + buildImplicitDependencies = "YES">
  7 + <BuildActionEntries>
  8 + <BuildActionEntry
  9 + buildForTesting = "YES"
  10 + buildForRunning = "YES"
  11 + buildForProfiling = "YES"
  12 + buildForArchiving = "YES"
  13 + buildForAnalyzing = "YES">
  14 + <BuildableReference
  15 + BuildableIdentifier = "primary"
  16 + BlueprintIdentifier = "38D6F06812197E62006909B6"
  17 + BuildableName = "ExpanderDemo.app"
  18 + BlueprintName = "ExpanderDemo"
  19 + ReferencedContainer = "container:ExpanderDemo.xcodeproj">
  20 + </BuildableReference>
  21 + </BuildActionEntry>
  22 + </BuildActionEntries>
  23 + </BuildAction>
  24 + <TestAction
  25 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  26 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  27 + shouldUseLaunchSchemeArgsEnv = "YES"
  28 + buildConfiguration = "Debug">
  29 + <Testables>
  30 + </Testables>
  31 + <MacroExpansion>
  32 + <BuildableReference
  33 + BuildableIdentifier = "primary"
  34 + BlueprintIdentifier = "38D6F06812197E62006909B6"
  35 + BuildableName = "ExpanderDemo.app"
  36 + BlueprintName = "ExpanderDemo"
  37 + ReferencedContainer = "container:ExpanderDemo.xcodeproj">
  38 + </BuildableReference>
  39 + </MacroExpansion>
  40 + </TestAction>
  41 + <LaunchAction
  42 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  43 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  44 + launchStyle = "0"
  45 + useCustomWorkingDirectory = "NO"
  46 + buildConfiguration = "Debug"
  47 + ignoresPersistentStateOnLaunch = "NO"
  48 + debugDocumentVersioning = "YES"
  49 + allowLocationSimulation = "YES">
  50 + <BuildableProductRunnable>
  51 + <BuildableReference
  52 + BuildableIdentifier = "primary"
  53 + BlueprintIdentifier = "38D6F06812197E62006909B6"
  54 + BuildableName = "ExpanderDemo.app"
  55 + BlueprintName = "ExpanderDemo"
  56 + ReferencedContainer = "container:ExpanderDemo.xcodeproj">
  57 + </BuildableReference>
  58 + </BuildableProductRunnable>
  59 + <AdditionalOptions>
  60 + </AdditionalOptions>
  61 + </LaunchAction>
  62 + <ProfileAction
  63 + shouldUseLaunchSchemeArgsEnv = "YES"
  64 + savedToolIdentifier = ""
  65 + useCustomWorkingDirectory = "NO"
  66 + buildConfiguration = "Release"
  67 + debugDocumentVersioning = "YES">
  68 + <BuildableProductRunnable>
  69 + <BuildableReference
  70 + BuildableIdentifier = "primary"
  71 + BlueprintIdentifier = "38D6F06812197E62006909B6"
  72 + BuildableName = "ExpanderDemo.app"
  73 + BlueprintName = "ExpanderDemo"
  74 + ReferencedContainer = "container:ExpanderDemo.xcodeproj">
  75 + </BuildableReference>
  76 + </BuildableProductRunnable>
  77 + </ProfileAction>
  78 + <AnalyzeAction
  79 + buildConfiguration = "Debug">
  80 + </AnalyzeAction>
  81 + <ArchiveAction
  82 + buildConfiguration = "Release"
  83 + revealArchiveInOrganizer = "YES">
  84 + </ArchiveAction>
  85 +</Scheme>
9 Examples/ImageDemo/ImageDemo.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
3 3 archiveVersion = 1;
4 4 classes = {
5 5 };
6   - objectVersion = 45;
  6 + objectVersion = 46;
7 7 objects = {
8 8
9 9 /* Begin PBXBuildFile section */
@@ -319,8 +319,11 @@
319 319 /* Begin PBXProject section */
320 320 29B97313FDCFA39411CA2CEA /* Project object */ = {
321 321 isa = PBXProject;
  322 + attributes = {
  323 + LastUpgradeCheck = 0430;
  324 + };
322 325 buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ImageDemo" */;
323   - compatibilityVersion = "Xcode 3.1";
  326 + compatibilityVersion = "Xcode 3.2";
324 327 developmentRegion = English;
325 328 hasScannedForEncodings = 1;
326 329 knownRegions = (
@@ -448,7 +451,6 @@
448 451 GCC_C_LANGUAGE_STANDARD = c99;
449 452 GCC_WARN_ABOUT_RETURN_TYPE = YES;
450 453 GCC_WARN_UNUSED_VARIABLE = YES;
451   - PREBINDING = NO;
452 454 SDKROOT = iphoneos;
453 455 TARGETED_DEVICE_FAMILY = 2;
454 456 };
@@ -464,7 +466,6 @@
464 466 GCC_WARN_ABOUT_RETURN_TYPE = YES;
465 467 GCC_WARN_UNUSED_VARIABLE = YES;
466 468 OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
467   - PREBINDING = NO;
468 469 SDKROOT = iphoneos;
469 470 TARGETED_DEVICE_FAMILY = 2;
470 471 };
85 Examples/ImageDemo/ImageDemo.xcodeproj/xcshareddata/xcschemes/ImageDemo.xcscheme
... ... @@ -0,0 +1,85 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + version = "1.3">
  4 + <BuildAction
  5 + parallelizeBuildables = "YES"
  6 + buildImplicitDependencies = "YES">
  7 + <BuildActionEntries>
  8 + <BuildActionEntry
  9 + buildForTesting = "YES"
  10 + buildForRunning = "YES"
  11 + buildForProfiling = "YES"
  12 + buildForArchiving = "YES"
  13 + buildForAnalyzing = "YES">
  14 + <BuildableReference
  15 + BuildableIdentifier = "primary"
  16 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  17 + BuildableName = "ImageDemo.app"
  18 + BlueprintName = "ImageDemo"
  19 + ReferencedContainer = "container:ImageDemo.xcodeproj">
  20 + </BuildableReference>
  21 + </BuildActionEntry>
  22 + </BuildActionEntries>
  23 + </BuildAction>
  24 + <TestAction
  25 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  26 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  27 + shouldUseLaunchSchemeArgsEnv = "YES"
  28 + buildConfiguration = "Debug">
  29 + <Testables>
  30 + </Testables>
  31 + <MacroExpansion>
  32 + <BuildableReference
  33 + BuildableIdentifier = "primary"
  34 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  35 + BuildableName = "ImageDemo.app"
  36 + BlueprintName = "ImageDemo"
  37 + ReferencedContainer = "container:ImageDemo.xcodeproj">
  38 + </BuildableReference>
  39 + </MacroExpansion>
  40 + </TestAction>
  41 + <LaunchAction
  42 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  43 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  44 + launchStyle = "0"
  45 + useCustomWorkingDirectory = "NO"
  46 + buildConfiguration = "Debug"
  47 + ignoresPersistentStateOnLaunch = "NO"
  48 + debugDocumentVersioning = "YES"
  49 + allowLocationSimulation = "YES">
  50 + <BuildableProductRunnable>
  51 + <BuildableReference
  52 + BuildableIdentifier = "primary"
  53 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  54 + BuildableName = "ImageDemo.app"
  55 + BlueprintName = "ImageDemo"
  56 + ReferencedContainer = "container:ImageDemo.xcodeproj">
  57 + </BuildableReference>
  58 + </BuildableProductRunnable>
  59 + <AdditionalOptions>
  60 + </AdditionalOptions>
  61 + </LaunchAction>
  62 + <ProfileAction
  63 + shouldUseLaunchSchemeArgsEnv = "YES"
  64 + savedToolIdentifier = ""
  65 + useCustomWorkingDirectory = "NO"
  66 + buildConfiguration = "Release"
  67 + debugDocumentVersioning = "YES">
  68 + <BuildableProductRunnable>
  69 + <BuildableReference
  70 + BuildableIdentifier = "primary"
  71 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  72 + BuildableName = "ImageDemo.app"
  73 + BlueprintName = "ImageDemo"
  74 + ReferencedContainer = "container:ImageDemo.xcodeproj">
  75 + </BuildableReference>
  76 + </BuildableProductRunnable>
  77 + </ProfileAction>
  78 + <AnalyzeAction
  79 + buildConfiguration = "Debug">
  80 + </AnalyzeAction>
  81 + <ArchiveAction
  82 + buildConfiguration = "Release"
  83 + revealArchiveInOrganizer = "YES">
  84 + </ArchiveAction>
  85 +</Scheme>
9 Examples/SpringBoard/SpringBoard.xcodeproj/project.pbxproj
@@ -3,7 +3,7 @@
3 3 archiveVersion = 1;
4 4 classes = {
5 5 };
6   - objectVersion = 45;
  6 + objectVersion = 46;
7 7 objects = {
8 8
9 9 /* Begin PBXBuildFile section */
@@ -205,8 +205,11 @@
205 205 /* Begin PBXProject section */
206 206 29B97313FDCFA39411CA2CEA /* Project object */ = {
207 207 isa = PBXProject;
  208 + attributes = {
  209 + LastUpgradeCheck = 0430;
  210 + };
208 211 buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SpringBoard" */;
209   - compatibilityVersion = "Xcode 3.1";
  212 + compatibilityVersion = "Xcode 3.2";
210 213 developmentRegion = English;
211 214 hasScannedForEncodings = 1;
212 215 knownRegions = (
@@ -303,7 +306,6 @@
303 306 GCC_C_LANGUAGE_STANDARD = c99;
304 307 GCC_WARN_ABOUT_RETURN_TYPE = YES;
305 308 GCC_WARN_UNUSED_VARIABLE = YES;
306   - PREBINDING = NO;
307 309 SDKROOT = iphoneos;
308 310 TARGETED_DEVICE_FAMILY = 2;
309 311 };
@@ -319,7 +321,6 @@
319 321 GCC_WARN_ABOUT_RETURN_TYPE = YES;
320 322 GCC_WARN_UNUSED_VARIABLE = YES;
321 323 OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
322   - PREBINDING = NO;
323 324 SDKROOT = iphoneos;
324 325 TARGETED_DEVICE_FAMILY = 2;
325 326 };
85 Examples/SpringBoard/SpringBoard.xcodeproj/xcshareddata/xcschemes/SpringBoard.xcscheme
... ... @@ -0,0 +1,85 @@
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + version = "1.3">
  4 + <BuildAction
  5 + parallelizeBuildables = "YES"
  6 + buildImplicitDependencies = "YES">
  7 + <BuildActionEntries>
  8 + <BuildActionEntry
  9 + buildForTesting = "YES"
  10 + buildForRunning = "YES"
  11 + buildForProfiling = "YES"
  12 + buildForArchiving = "YES"
  13 + buildForAnalyzing = "YES">
  14 + <BuildableReference
  15 + BuildableIdentifier = "primary"
  16 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  17 + BuildableName = "SpringBoard.app"
  18 + BlueprintName = "SpringBoard"
  19 + ReferencedContainer = "container:SpringBoard.xcodeproj">
  20 + </BuildableReference>
  21 + </BuildActionEntry>
  22 + </BuildActionEntries>
  23 + </BuildAction>
  24 + <TestAction
  25 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  26 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  27 + shouldUseLaunchSchemeArgsEnv = "YES"
  28 + buildConfiguration = "Debug">
  29 + <Testables>
  30 + </Testables>
  31 + <MacroExpansion>
  32 + <BuildableReference
  33 + BuildableIdentifier = "primary"
  34 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  35 + BuildableName = "SpringBoard.app"
  36 + BlueprintName = "SpringBoard"
  37 + ReferencedContainer = "container:SpringBoard.xcodeproj">
  38 + </BuildableReference>
  39 + </MacroExpansion>
  40 + </TestAction>
  41 + <LaunchAction
  42 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  43 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  44 + launchStyle = "0"
  45 + useCustomWorkingDirectory = "NO"
  46 + buildConfiguration = "Debug"
  47 + ignoresPersistentStateOnLaunch = "NO"
  48 + debugDocumentVersioning = "YES"
  49 + allowLocationSimulation = "YES">
  50 + <BuildableProductRunnable>
  51 + <BuildableReference
  52 + BuildableIdentifier = "primary"
  53 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  54 + BuildableName = "SpringBoard.app"
  55 + BlueprintName = "SpringBoard"
  56 + ReferencedContainer = "container:SpringBoard.xcodeproj">
  57 + </BuildableReference>
  58 + </BuildableProductRunnable>
  59 + <AdditionalOptions>
  60 + </AdditionalOptions>
  61 + </LaunchAction>
  62 + <ProfileAction
  63 + shouldUseLaunchSchemeArgsEnv = "YES"
  64 + savedToolIdentifier = ""
  65 + useCustomWorkingDirectory = "NO"
  66 + buildConfiguration = "Release"
  67 + debugDocumentVersioning = "YES">
  68 + <BuildableProductRunnable>
  69 + <BuildableReference
  70 + BuildableIdentifier = "primary"
  71 + BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
  72 + BuildableName = "SpringBoard.app"
  73 + BlueprintName = "SpringBoard"
  74 + ReferencedContainer = "container:SpringBoard.xcodeproj">
  75 + </BuildableReference>
  76 + </BuildableProductRunnable>
  77 + </ProfileAction>
  78 + <AnalyzeAction
  79 + buildConfiguration = "Debug">
  80 + </AnalyzeAction>
  81 + <ArchiveAction
  82 + buildConfiguration = "Release"
  83 + revealArchiveInOrganizer = "YES">
  84 + </ArchiveAction>
  85 +</Scheme>

0 comments on commit e8f9358

Please sign in to comment.
Something went wrong with that request. Please try again.