diff --git a/WolvenKit.CR2W/CR2W/CR2WFile.cs b/WolvenKit.CR2W/CR2W/CR2WFile.cs index 453fe783..2c42325b 100644 --- a/WolvenKit.CR2W/CR2W/CR2WFile.cs +++ b/WolvenKit.CR2W/CR2W/CR2WFile.cs @@ -66,7 +66,7 @@ public CR2WFile(LoggerService logger=null) // misc private uint headerOffset = 0; - private bool m_hasInternalBuffer; + public bool m_hasInternalBuffer; //private Stream m_stream; //handle this better? // private string m_filePath; diff --git a/WolvenKit.CR2W/JSON/CR2WJsonTool.cs b/WolvenKit.CR2W/JSON/CR2WJsonTool.cs index 4c8c312c..d0d25a64 100644 --- a/WolvenKit.CR2W/JSON/CR2WJsonTool.cs +++ b/WolvenKit.CR2W/JSON/CR2WJsonTool.cs @@ -126,6 +126,14 @@ public static bool ImportJSON(string jsonPath, string cr2wPath, CR2WJsonToolOpti return false; } + for (int i = 0; i < cr2w.buffers.Count; i++) + { + if (cr2w.buffers[i].Data != null) + { + cr2w.m_hasInternalBuffer = true; + break; + } + } WriteCR2W(cr2w, cr2wPath); return true; }