changeset 6190:97813557b6fa

fix CopyString
author Alain Mazy <am@orthanc.team>
date Fri, 13 Jun 2025 07:23:17 +0200
parents 24fc490e40b7
children e1168108e57f ebf70f0cde4c
files OrthancServer/Plugins/Engine/OrthancPlugins.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Plugins/Engine/OrthancPlugins.cpp	Thu Jun 12 13:27:51 2025 +0200
+++ b/OrthancServer/Plugins/Engine/OrthancPlugins.cpp	Fri Jun 13 07:23:17 2025 +0200
@@ -449,7 +449,7 @@
       memcpy(result, str.c_str(), str.size());
     }
 
-    result[str.size() - 1] = '\0';  // Add the null terminator of the string
+    result[str.size()] = '\0';  // Add the null terminator of the string
 
     return result;
   }