Skip to content

Commit

Permalink
Switch to SVars for mid-term data storage, especially since the code …
Browse files Browse the repository at this point in the history
…uses a lot of FS reloading which likes to clobber properties.
  • Loading branch information
Alex Cole committed Apr 24, 2024
1 parent 755bd94 commit a4ac714
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions YSI_Extra/y_bcrypt/y_bcrypt_entry.inc
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ public _YSI_BCryptHashDone(hashid, arg2, arg3)
new
prop[16];
format(prop, sizeof (prop), YSI_gscProp1, hashid),
extra = getproperty(0, prop),
deleteproperty(0, prop),
extra = GetSVarInt(prop),
DeleteSVar(prop),
format(prop, sizeof (prop), YSI_gscProp2, hashid),
ptr = getproperty(0, prop),
deleteproperty(0, prop);
ptr = GetSVarInt(prop),
DeleteSVar(prop);
}
case 2:
{
Expand All @@ -136,11 +136,11 @@ public _YSI_BCryptHashDone(hashid, arg2, arg3)
prop[16];
_YSI_gLastHash = arg2,
format(prop, sizeof (prop), YSI_gscProp1, hashid),
extra = getproperty(0, prop),
deleteproperty(0, prop),
extra = GetSVarInt(prop),
DeleteSVar(prop),
format(prop, sizeof (prop), YSI_gscProp2, hashid),
ptr = getproperty(0, prop),
deleteproperty(0, prop);
ptr = GetSVarInt(prop),
DeleteSVar(prop);
}
case 3:
{
Expand All @@ -150,9 +150,9 @@ public _YSI_BCryptHashDone(hashid, arg2, arg3)
new
prop[16];
format(prop, sizeof (prop), YSI_gscProp1, hashid),
deleteproperty(0, prop),
DeleteSVar(prop),
format(prop, sizeof (prop), YSI_gscProp2, hashid),
deleteproperty(0, prop),
DeleteSVar(prop),
BCrypt_SetPlugin(BCRYPT_PLUGIN_VERSION_SREYAS_3);
}
ptr = arg2;
Expand Down Expand Up @@ -223,9 +223,9 @@ stock _BCrypt_Hash(extra, ptr, const password[], cost)
new
prop[16];
format(prop, sizeof (prop), YSI_gscProp1, _YSI_gHashID),
setproperty(0, prop, extra),
SetSVarInt(prop, extra),
format(prop, sizeof (prop), YSI_gscProp2, _YSI_gHashID),
setproperty(0, prop, ptr);
SetSVarInt(prop, ptr);
return _YSI_gHashID;
}
}
Expand All @@ -236,9 +236,9 @@ stock _BCrypt_Hash(extra, ptr, const password[], cost)
new
prop[16];
format(prop, sizeof (prop), YSI_gscProp1, _YSI_gHashID),
setproperty(0, prop, extra),
SetSVarInt(prop, extra),
format(prop, sizeof (prop), YSI_gscProp2, _YSI_gHashID),
setproperty(0, prop, ptr);
SetSVarInt(prop, ptr);
return _YSI_gHashID;
}
}
Expand Down

0 comments on commit a4ac714

Please sign in to comment.