From b99e783a3201a6641a21e51034fffc6a87003269 Mon Sep 17 00:00:00 2001
From: Amorilia <amorilia@users.sourceforge.net>
Date: Mon, 9 Mar 2009 22:29:27 +0000
Subject: [PATCH] niflib: also increase maximum string length to 0x4000 (as
 recently done in nifskope)

---
 src/NIF_IO.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/NIF_IO.cpp b/src/NIF_IO.cpp
index db0f7b42..ac357c2b 100644
--- a/src/NIF_IO.cpp
+++ b/src/NIF_IO.cpp
@@ -153,7 +153,7 @@ float ReadFloat( istream &in ){
 string ReadString( istream &in ) {
 	unsigned int len = ReadUInt( in );
 	string out;
-	if ( len > 10000 )
+	if ( len > 0x4000 )
 	    throw runtime_error("String too long. Not a NIF file or unsupported format?");
 	if ( len > 0 ) {
 	    out.resize(len);
-- 
GitLab