[Extractor-gtk-cvslog] SF.net SVN: extractor-gtk:[110] trunk/extractor/nwn.c
Extract files from unusual archive formats
Brought to you by:
someone-guy
|
From: <som...@us...> - 2008-08-24 10:26:55
|
Revision: 110
http://extractor-gtk.svn.sourceforge.net/extractor-gtk/?rev=110&view=rev
Author: someone-guy
Date: 2008-08-24 10:26:53 +0000 (Sun, 24 Aug 2008)
Log Message:
-----------
Distinguish between NWN1 V1.1 and NWN2 files
Modified Paths:
--------------
trunk/extractor/nwn.c
Modified: trunk/extractor/nwn.c
===================================================================
--- trunk/extractor/nwn.c 2008-08-23 11:21:39 UTC (rev 109)
+++ trunk/extractor/nwn.c 2008-08-24 10:26:53 UTC (rev 110)
@@ -31,7 +31,9 @@
rewind(in);
fread(sig, 8, 1, in);
if (strcmp(sig, "MOD V1.1") == 0) version = 1;
- if (version) namelen = 32;
+ // for some idiocy, both NWN1 premium modules and
+ // NWN2 modules use MOD V1.1. Try to distinguish them.
+ if (version && read_le32(in) == 0 && read_le32(in) == 0) namelen = 32;
fseek(in, 0x10, SEEK_SET);
count = read_le32(in);
if (count > MAX_FILES) count = MAX_FILES;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|