Skip to content

Commit a468620

Browse files
committed
Fix the previous section while I'm in here
1 parent a260e0f commit a468620

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Documentation/Porting.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,13 @@ to load that information:
140140
+ UseResFile(refNum);
141141
+ Handle handle = Get1NamedResource('swft', "\p__swift5_types");
142142
+ if (handle && *handle) {
143-
+ size_t size = GetHandleSize(handle);
144-
+ body(*handle, size);
143+
+ auto imageAddress = reinterpret_cast<const void *>(static_cast<uintptr_t>(refNum));
144+
+ SWTSectionBounds sb = { imageAddress, *handle, GetHandleSize(handle) };
145+
+ bool stop = false;
146+
+ body(sb, &stop);
147+
+ if (stop) {
148+
+ break;
149+
+ }
145150
+ }
146151
+ } while (noErr == GetNextResourceFile(refNum, &refNum));
147152
+ UseResFile(oldRefNum);

0 commit comments

Comments
 (0)