[PATCH 3/5] ddraw/tests: Restore strings modified by D3D7EnumLifetimeTest
Andrew D'Addesio
andrew at fatbag.net
Sun Oct 4 12:46:04 CDT 2015
---
dlls/ddraw/tests/d3d.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c
index 2505196..df6b3cf 100644
--- a/dlls/ddraw/tests/d3d.c
+++ b/dlls/ddraw/tests/d3d.c
@@ -793,10 +793,10 @@ static void D3D7EnumLifetimeTest(void)
}
/* Try altering the contents of the enumeration strings. */
- for (i = 0; i < ctx2.count; i++)
+ for (i = 0; i < ctx.count; i++)
{
- strcpy(ctx2.callback_description_ptrs[i], "Fake Description");
- strcpy(ctx2.callback_name_ptrs[i], "Fake Device");
+ strcpy(ctx.callback_description_ptrs[i], "Fake Description");
+ strcpy(ctx.callback_name_ptrs[i], "Fake Device");
}
ctx2.count = 0;
@@ -819,6 +819,13 @@ static void D3D7EnumLifetimeTest(void)
"Got '%s' and '%s'\n", ctx.callback_name_strings[i], ctx2.callback_name_strings[i]);
}
}
+
+ /* Restore the original strings. */
+ for (i = 0; i < ctx.count; i++)
+ {
+ strcpy(ctx.callback_description_ptrs[i], ctx.callback_description_strings[i]);
+ strcpy(ctx.callback_name_ptrs[i], ctx.callback_name_strings[i]);
+ }
}
static void CapsTest(void)
--
2.4.3
More information about the wine-patches
mailing list