mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Reverted ScriptValue DataType from long to short
* for reasons unknown, it was the cause of random hang/crash when running certain script sequences. (closes #517) Updated version number.
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
;sfall configuration settings
|
;sfall configuration settings
|
||||||
;v4.4.3
|
;v4.4.3.1
|
||||||
|
|
||||||
[Main]
|
[Main]
|
||||||
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
|
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
|
||||||
|
|||||||
@@ -188,7 +188,8 @@ void sArrayVar::clearAll()
|
|||||||
void SaveArrayElement(sArrayElement* el, HANDLE h)
|
void SaveArrayElement(sArrayElement* el, HANDLE h)
|
||||||
{
|
{
|
||||||
DWORD unused;
|
DWORD unused;
|
||||||
WriteFile(h, &el->type, 4, &unused, 0);
|
DWORD elType = static_cast<DWORD>(el->type); // for interoperability with older versions
|
||||||
|
WriteFile(h, &elType, 4, &unused, 0);
|
||||||
if (el->type == DataType::STR) {
|
if (el->type == DataType::STR) {
|
||||||
WriteFile(h, &el->len, 4, &unused, 0);
|
WriteFile(h, &el->len, 4, &unused, 0);
|
||||||
WriteFile(h, el->strVal, el->len, &unused, 0);
|
WriteFile(h, el->strVal, el->len, &unused, 0);
|
||||||
@@ -199,9 +200,9 @@ void SaveArrayElement(sArrayElement* el, HANDLE h)
|
|||||||
|
|
||||||
bool LoadArrayElement(sArrayElement* el, HANDLE h)
|
bool LoadArrayElement(sArrayElement* el, HANDLE h)
|
||||||
{
|
{
|
||||||
DWORD unused;
|
DWORD elType, unused;
|
||||||
ReadFile(h, &el->type, 4, &unused, 0);
|
ReadFile(h, &elType, 4, &unused, 0);
|
||||||
el->type = (DataType)((DWORD)el->type & 0xFFFF); // fix for saved arrays from 4.4
|
el->type = static_cast<DataType>(elType & 0xFFFF); // for saved arrays from 4.4
|
||||||
if (el->type == DataType::STR) {
|
if (el->type == DataType::STR) {
|
||||||
ReadFile(h, &el->len, 4, &unused, 0);
|
ReadFile(h, &el->len, 4, &unused, 0);
|
||||||
if (el->len > 0) {
|
if (el->len > 0) {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ namespace sfall
|
|||||||
namespace script
|
namespace script
|
||||||
{
|
{
|
||||||
|
|
||||||
enum class DataType : unsigned long {
|
enum class DataType : unsigned short {
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
INT = 1,
|
INT = 1,
|
||||||
FLOAT = 2,
|
FLOAT = 2,
|
||||||
|
|||||||
+2
-2
@@ -25,6 +25,6 @@
|
|||||||
#define VERSION_MAJOR 4
|
#define VERSION_MAJOR 4
|
||||||
#define VERSION_MINOR 4
|
#define VERSION_MINOR 4
|
||||||
#define VERSION_BUILD 3
|
#define VERSION_BUILD 3
|
||||||
#define VERSION_REV 0
|
#define VERSION_REV 1
|
||||||
|
|
||||||
#define VERSION_STRING "4.4.3"
|
#define VERSION_STRING "4.4.3.1"
|
||||||
|
|||||||
Reference in New Issue
Block a user