mirror of
https://github.com/aaru-dps/fstester.git
synced 2025-12-16 19:24:39 +00:00
Handles in Carbon are garbage-collected double-pointers, fix their usage.
This commit is contained in:
@@ -219,7 +219,9 @@ int CarbonResourceFork(const char* path)
|
|||||||
|
|
||||||
if(h)
|
if(h)
|
||||||
{
|
{
|
||||||
memcpy(h, IcnsResource, ICNS_RESOURCE_SIZE);
|
HLock(h);
|
||||||
|
memcpy(*h, IcnsResource, ICNS_RESOURCE_SIZE);
|
||||||
|
HUnlock(h);
|
||||||
AddResource(h, rtIcons, -16455, IcnsResourceNamePascal);
|
AddResource(h, rtIcons, -16455, IcnsResourceNamePascal);
|
||||||
WriteResource(h);
|
WriteResource(h);
|
||||||
ReleaseResource(h);
|
ReleaseResource(h);
|
||||||
@@ -276,7 +278,9 @@ int CarbonResourceFork(const char* path)
|
|||||||
|
|
||||||
if(h)
|
if(h)
|
||||||
{
|
{
|
||||||
memcpy(h, PictResource, PICT_RESOURCE_SIZE);
|
HLock(h);
|
||||||
|
memcpy(*h, PictResource, PICT_RESOURCE_SIZE);
|
||||||
|
HUnlock(h);
|
||||||
AddResource(h, ftPICTFile, 29876, PictResourceNamePascal);
|
AddResource(h, ftPICTFile, 29876, PictResourceNamePascal);
|
||||||
WriteResource(h);
|
WriteResource(h);
|
||||||
ReleaseResource(h);
|
ReleaseResource(h);
|
||||||
@@ -333,7 +337,9 @@ int CarbonResourceFork(const char* path)
|
|||||||
|
|
||||||
if(h)
|
if(h)
|
||||||
{
|
{
|
||||||
memcpy(h, VersResource, VERS_RESOURCE_SIZE);
|
HLock(h);
|
||||||
|
memcpy(*h, VersResource, VERS_RESOURCE_SIZE);
|
||||||
|
HUnlock(h);
|
||||||
AddResource(h, rtVersion, 1, VersResourceNamePascal);
|
AddResource(h, rtVersion, 1, VersResourceNamePascal);
|
||||||
WriteResource(h);
|
WriteResource(h);
|
||||||
ReleaseResource(h);
|
ReleaseResource(h);
|
||||||
@@ -390,7 +396,9 @@ int CarbonResourceFork(const char* path)
|
|||||||
|
|
||||||
if(h)
|
if(h)
|
||||||
{
|
{
|
||||||
memcpy(h, IcnsResource, ICNS_RESOURCE_SIZE);
|
HLock(h);
|
||||||
|
memcpy(*h, IcnsResource, ICNS_RESOURCE_SIZE);
|
||||||
|
HUnlock(h);
|
||||||
AddResource(h, rtIcons, -16455, IcnsResourceNamePascal);
|
AddResource(h, rtIcons, -16455, IcnsResourceNamePascal);
|
||||||
WriteResource(h);
|
WriteResource(h);
|
||||||
ReleaseResource(h);
|
ReleaseResource(h);
|
||||||
@@ -402,7 +410,9 @@ int CarbonResourceFork(const char* path)
|
|||||||
|
|
||||||
if(h)
|
if(h)
|
||||||
{
|
{
|
||||||
memcpy(h, PictResource, PICT_RESOURCE_SIZE);
|
HLock(h);
|
||||||
|
memcpy(*h, PictResource, PICT_RESOURCE_SIZE);
|
||||||
|
HUnlock(h);
|
||||||
AddResource(h, ftPICTFile, -16455, PictResourceNamePascal);
|
AddResource(h, ftPICTFile, -16455, PictResourceNamePascal);
|
||||||
WriteResource(h);
|
WriteResource(h);
|
||||||
ReleaseResource(h);
|
ReleaseResource(h);
|
||||||
@@ -414,7 +424,9 @@ int CarbonResourceFork(const char* path)
|
|||||||
|
|
||||||
if(h)
|
if(h)
|
||||||
{
|
{
|
||||||
memcpy(h, VersResource, VERS_RESOURCE_SIZE);
|
HLock(h);
|
||||||
|
memcpy(*h, VersResource, VERS_RESOURCE_SIZE);
|
||||||
|
HUnlock(h);
|
||||||
AddResource(h, rtVersion, 1, VersResourceNamePascal);
|
AddResource(h, rtVersion, 1, VersResourceNamePascal);
|
||||||
WriteResource(h);
|
WriteResource(h);
|
||||||
ReleaseResource(h);
|
ReleaseResource(h);
|
||||||
|
|||||||
Reference in New Issue
Block a user