From 0a50a9b70d9cbbe56d1a4c7c925cb9f2bc07ed48 Mon Sep 17 00:00:00 2001
From: Akash Mozumdar <akashmozumdar@gmail.com>
Date: Tue, 7 May 2019 05:42:35 -0400
Subject: [PATCH] more reliable shino hook

---
 texthook/engine/engine.cc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/texthook/engine/engine.cc b/texthook/engine/engine.cc
index 037ecea..cc571bc 100644
--- a/texthook/engine/engine.cc
+++ b/texthook/engine/engine.cc
@@ -5763,15 +5763,15 @@ int GetShinaRioVersion()
   if (hFile != INVALID_HANDLE_VALUE)  {
     //char *buffer,*version;//,*ptr;
     enum { BufferSize = 0x40 };
-    char buffer[BufferSize];
+	char buffer[BufferSize]{};
 	DWORD DUMMY;
     ReadFile(hFile, buffer, BufferSize, &DUMMY, nullptr);
     CloseHandle(hFile);
-    if (buffer[0] == '[') {
+    //if (buffer[0] == '[') {
       buffer[0x3f] = 0; // jichi 8/24/2013: prevent strstr from overflow
       if (char *version = ::strstr(buffer, "v2."))
         ::sscanf(version + 3, "%d", &ret); // +3 to skip "v2."
-    }
+    //}
   }
   return ret;
 }