changeset 648:ed7f4b86af78

* common/eCosTestPlatform.cpp: Allow an extra char for string termination.
author jld
date Fri, 21 Feb 2003 21:54:23 +0000
parents 158ceac0a1ef
children 77bd67c8500e
files host/tools/ecostest/ChangeLog host/tools/ecostest/common/eCosTestPlatform.cpp
diffstat 2 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/host/tools/ecostest/ChangeLog
+++ b/host/tools/ecostest/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-21  John Dallaway  <jld@ecoscentric.com>
+
+	* common/eCosTestPlatform.cpp (CeCosTestPlatform::Load): Allow an
+	extra character for string termination when retrieving registry
+	key names.
+
 2003-02-13  John Dallaway  <jld@ecoscentric.com>
 
 	* common/eCosTestPlatform.cpp:
--- a/host/tools/ecostest/common/eCosTestPlatform.cpp
+++ b/host/tools/ecostest/common/eCosTestPlatform.cpp
@@ -171,14 +171,14 @@ bool CeCosTestPlatform::Load()
     DWORD dwMaxSubKeyLen;
     if(ERROR_SUCCESS==RegQueryInfoKey(hKey,NULL,NULL,NULL,&dwSubKeys,&dwMaxSubKeyLen,NULL,NULL,NULL,NULL,NULL,NULL)){
       TCHAR *szName=new TCHAR[1+dwMaxSubKeyLen];
-      DWORD dwSizeName=dwMaxSubKeyLen;
+      DWORD dwSizeName=sizeof(TCHAR)*(1+dwMaxSubKeyLen);
       for(DWORD dwIndex=0;ERROR_SUCCESS==RegEnumKeyEx(hKey, dwIndex, szName, &dwSizeName, NULL, NULL, NULL, &ftLastWriteTime); dwIndex++){
         CeCosTestPlatform t;
         if(t.LoadFromRegistry(hKey,szName)){
           t.m_strName=szName;
           CeCosTestPlatform::Add(t);
         }
-        dwSizeName=dwMaxSubKeyLen;
+        dwSizeName=sizeof(TCHAR)*(1+dwMaxSubKeyLen);
       }
       delete [] szName;
     }