<p><b>@nicolas-cellier-aka-nice</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/332#discussion_r244742722">platforms/win32/vm/sqWin32Main.c</a>:</p>
<pre style='color:#555'>>      WCHAR buffer[256];
     DWORD memSize;
 
     /* Argh. It seems that the registry key regularly starts
        with \Registry\Machine\ which doesn't work with RegOpenKey below.
        I have no idea why but for now I'll just truncate that part if
        we recognize it... */
-    if (_strnicmp(keyName, "\\registry\\machine\\", 18) == 0) {
-      memcpy(keyName, keyName+18, strlen(keyName)-17);
+    if (_wcsnicmp(keyName, L"\\registry\\machine\\", 18) == 0) {
+      memmove(keyName, keyName+18*sizeof(WCHAR), (wcslen(keyName)-17)*sizeof(WCHAR));
</pre>
<p>Err: <code>keyName</code> is <code>WCHAR*</code>, <code>keyName+18</code> skips 18 characters, <code>keyName+18*sizeof(WCHAR)</code> skips 36 characters!</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/332#pullrequestreview-188685921">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AhLyW16lhoS7yjhYVZmHtC7Bp3AmX-xMks5u_LvWgaJpZM4Zlkze">mute the thread</a>.<img src="https://github.com/notifications/beacon/AhLyW6IH6t800kTbi8TVB-nzbVbdYBIWks5u_LvWgaJpZM4Zlkze.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/OpenSmalltalk/opensmalltalk-vm","title":"OpenSmalltalk/opensmalltalk-vm","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm"}},"updates":{"snippets":[{"icon":"PERSON","message":"@nicolas-cellier-aka-nice commented on #332"}],"action":{"name":"View Pull Request","url":"https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/332#pullrequestreview-188685921"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/332#pullrequestreview-188685921",
"url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/332#pullrequestreview-188685921",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>