From a73c5a84076caff312aeb9c01aff005ccf2996b1 Mon Sep 17 00:00:00 2001
From: Amorilia <amorilia@users.sourceforge.net>
Date: Tue, 29 Nov 2005 01:15:58 +0000
Subject: [PATCH] Fix writing NIF header + small fix in AShapeData

---
 NIF_Blocks.cpp | 2 +-
 niflib.cpp     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/NIF_Blocks.cpp b/NIF_Blocks.cpp
index 60d6d547..99ef936d 100644
--- a/NIF_Blocks.cpp
+++ b/NIF_Blocks.cpp
@@ -713,7 +713,7 @@ string AShapeData::asString() {
  */
 void AShapeData::Write( ofstream& out, unsigned int version ){
 
-	WriteUShort( short(vertices.size()), out );
+	WriteUShort( ushort(vertices.size()), out );
 
 	if ( vertices.size() > 0 )
 		WriteBool( true, out, version );
diff --git a/niflib.cpp b/niflib.cpp
index d2067708..656a61b8 100644
--- a/niflib.cpp
+++ b/niflib.cpp
@@ -346,7 +346,7 @@ void WriteNifTree( string file_name, blk_ref & root_block, unsigned int version
 	int int_ver[4] = { byte_ver[3], byte_ver[2], byte_ver[1], byte_ver[0] };
 
 
-	header_string << int_ver[3] << "." << int_ver[2] << "." << int_ver[1] << "." << int_ver[0] << " ";
+	header_string << int_ver[0] << "." << int_ver[1] << "." << int_ver[2] << "." << int_ver[3];
 
 	out << header_string.str();
 	WriteByte( 10, out ); // Unknown Byte = 10
-- 
GitLab