Skip to content

Commit

Permalink
[runtime] Fix the initialization of the pid array in ves_icall_System…
Browse files Browse the repository at this point in the history
…_Diagnostics_Process_GetProcesses_internal ().
  • Loading branch information
vargaz committed May 13, 2015
1 parent df27ba1 commit 1d83b90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mono/metadata/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ ves_icall_System_Diagnostics_Process_GetProcesses_internal (void)
}
procs = mono_array_new (mono_domain_get (), mono_get_int32_class (), count);
if (sizeof (guint32) == sizeof (gpointer)) {
memcpy (mono_array_addr (procs, guint32, 0), pidarray, count);
memcpy (mono_array_addr (procs, guint32, 0), pidarray, count * sizeof (gint32));
} else {
for (i = 0; i < count; ++i)
*(mono_array_addr (procs, guint32, i)) = GPOINTER_TO_UINT (pidarray [i]);
Expand Down

0 comments on commit 1d83b90

Please sign in to comment.