changeset 335:6d1200c437af

The data parameters were swapped in the source I copied and pasted from the test program. Fixed the parameter names to reflect the actual meaning.
author Brian Smith <brian@dbsoft.org>
date Mon, 02 Dec 2019 03:12:42 -0600
parents 55b7b74c8a67
children c7f3c59a2792
files dwib.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/dwib.c	Sun Dec 01 22:04:31 2019 -0600
+++ b/dwib.c	Mon Dec 02 03:12:42 2019 -0600
@@ -6657,13 +6657,13 @@
 }
 
 /* Handle web javascript result */
-int DWSIGNAL web_html_result(HWND html, int status, char *result, void *user_data, void *script_data)
-{
-    HWND window = (HWND)script_data;
+int DWSIGNAL web_html_result(HWND html, int status, char *result, void *script_data, void *user_data)
+{
+    HWND window = (HWND)user_data;
     
     if(status == DW_ERROR_NONE && result && window)
     {
-        char tmpbuf[1025];
+        char tmpbuf[1025] = {0};
         
         snprintf(tmpbuf, 1024, "Dynamic Windows Interface Builder Browser - %s", result);
         dw_window_set_text(window, tmpbuf);