Fixed mixed variable declaration.
authorArmin Novak <armin.novak@gmail.com>
Mon, 17 Nov 2014 00:42:24 +0000 (01:42 +0100)
committerArmin Novak <armin.novak@gmail.com>
Mon, 17 Nov 2014 00:42:24 +0000 (01:42 +0100)
winpr/libwinpr/environment/environment.c

index e006f43..921736a 100644 (file)
@@ -354,6 +354,7 @@ LPCH MergeEnvironmentStrings(PCSTR original, PCSTR merge)
 
        while ((original != NULL) && (*envp && *(envp+1)))
        {
+               ULONG old_offset = offset;
                length = strlen(envp);
 
                while ((offset + length + 8) > cchEnvironmentBlock)
@@ -375,7 +376,6 @@ LPCH MergeEnvironmentStrings(PCSTR original, PCSTR merge)
 
                // check if this value is in the mergeStrings
                foundMerge = 0;
-               ULONG old_offset = offset;
                for (run = 0; run < mergeStringLength; run ++)
                {
                        if (!mergeStrings[run])