Commit Graph

27 Commits

Author SHA1 Message Date
Ladislav Zezula
e482d3847e Fixed SFileSetFilePointer on local files 2021-03-31 07:33:19 +02:00
Ladislav Zezula
b6102b2600 Removed trailing whitespace 2020-11-23 12:56:00 +01:00
Ladislav Zezula
809005c7f0 * Release 9.23
* Fixed regressions
* Fixed test program
2020-11-21 04:27:09 +01:00
Ladislav Zezula
4a07a5851c Added support for NP_Protect protector (SC2 Maps) 2020-09-22 17:02:57 +02:00
nvs
a881bb54bf Add brackets in SFileSetFilePointer when pointer < 0
This addresses a bug introduced in:

- fe652fe4a6

Brackets were not properly included, causing `SFILE_INVALID_POS` to be
returned whenever `DeltaPos` was less than zero, instead of only when
the resulting position was negative.
2018-05-01 17:36:29 -07:00
nvs
fe652fe4a6 Set SFileSetFilePointer error when new pointer < 0
This addresses an apparent oversight in the following commit:

- 951f416398

An error is not actually set, even though the return value now correctly
indicates failure.  Per the documentation for [`SetFilerPointer ()`][1],
this should be set to `ERROR_NEGATIVE_SEEK` on Windows.  On Mac/Linux,
this would be `EINVAL` as per the documentation for [`fseek ()`][2].

[1]: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365541(v=vs.85).aspx
[2]: http://pubs.opengroup.org/onlinepubs/9699919799/functions/fseek.html
2018-04-26 15:23:06 -07:00
Lectem
951f416398 SFileSetFilePointer error when new pointer is <0
The standard behaviour for fseek / SetFilePointer when the new pointed value would be negative is to not move the pointer and return an error.
See : https://msdn.microsoft.com/en-us/library/windows/desktop/aa365541(v=vs.85).aspx `If a new file pointer is a negative value, the function fails, the file pointer is not moved, and the code returned by GetLastError is ERROR_NEGATIVE_SEEK.`
2017-08-28 00:08:54 +02:00
Ladislav Zezula
866f56db23 + Reverted include directories 2016-11-06 16:50:07 +01:00
Lectem
32f7f18642 fix cmake dependency and move headers to include 2016-11-05 03:56:39 +01:00
Ladislav Zezula
3224eac75e + Fixed bounds checking in SFileSetFilePointer 2016-05-03 16:33:49 +02:00
unknown
a8a92ccc92 + Fixed bug in SFileReadFile 2015-05-28 17:24:56 +02:00
Ladislav Zezula
61f552875d + Fixed coverity bugs 2015-05-28 15:41:29 +02:00
Ladislav Zezula
1b38ceb0d4 + Fixed defects found by Coverity (well, most of them) 2015-05-28 13:49:23 +02:00
unknown
3cfa7f2a1a + Fixed possible stack overflow in HashStringJenkins
+ StormLib now creates a listfile even for empty archives to make sure it will be maintained at later point when files are added to it
+ Bug fixes in listfile loading
2015-05-06 16:33:45 +02:00
unknown
46930855f5 + Removed back reference of FileTable -> HashTable, as it is logically incorrect
+ Optimized patching process so it consimes less memory
+ Added hash table and block table defragmenting for malformed War3 maps
2015-05-01 07:06:29 +02:00
unknown
9337089747 + Better handling of MPQs corrupted by yet another silly MPQ protector 2015-04-01 06:52:50 +02:00
unknown
c2261d5103 + Support for MPQ.KangTooJee map protector
+ Compacting optimized
2015-03-13 17:06:51 +01:00
unknown
23ffb9d452 + More paratemer checking to make nitpickers happy 2015-01-18 17:34:34 +01:00
Ladislav Zezula
3e594190e4 + Files with zero size are now processed properly during archive compacting
+ Fixed few memory leaks
2014-12-02 09:38:34 +01:00
Ladislav Zezula
c8f8ef264e + Fixed bug in SFileSetFilePointer 2014-05-06 14:18:10 +02:00
Ladislav Zezula
568f189ea5 + Improved key detection for archives with large sector sizes 2014-03-14 10:17:34 +01:00
Ladislav
fe51da468b + static analysis issues fixed 2013-12-15 10:29:50 +01:00
Ladislav Zezula
6961cd51b6 + Fixed warnings
+ Added SBaseDumpData to the makefiles
2013-12-12 11:15:16 +01:00
Ladislav Zezula
c34c37b341 + StormLib 9.0 BETA 2013-12-05 15:59:00 +01:00
Ladislav
87eb1df287 + Support for compile-time messages for deprecated symbols
+ Replaced MPQ_FILE_COMPRESSED with more descriptive MPQ_FILE_COMPRESS_MASK
2013-11-15 10:17:43 +01:00
Ladislav Zezula
a70863499e + Support for SQP and MPK archives
+ Makefiles fixed
2013-11-13 07:56:31 +01:00
Ladislav Zezula
3a926f0228 Initial creation 2013-01-11 14:55:08 +01:00