[UMPNPMGR] Fix remaining length calculation
authorMark Jansen <mark.jansen@reactos.org>
Fri, 2 Apr 2021 23:43:48 +0000 (01:43 +0200)
committerMark Jansen <mark.jansen@reactos.org>
Fri, 2 Apr 2021 23:43:48 +0000 (01:43 +0200)
base/services/umpnpmgr/rpcserver.c

index cf49713..cba8968 100644 (file)
@@ -1153,7 +1153,7 @@ GetEnumeratorInstanceList(
             break;
 
         dwUsedLength += dwPathLength - 1;
-        dwRemainingLength += dwPathLength - 1;
+        dwRemainingLength -= dwPathLength - 1;
         pPtr += dwPathLength - 1;
     }
 
@@ -1203,7 +1203,7 @@ GetAllInstanceList(
             break;
 
         dwUsedLength += dwPathLength - 1;
-        dwRemainingLength += dwPathLength - 1;
+        dwRemainingLength -= dwPathLength - 1;
         pPtr += dwPathLength - 1;
     }