diff --git a/bindings/java/src/jni/win32/eventlog.c b/bindings/java/src/jni/win32/eventlog.c index c2997545..011e37f3 100644 --- a/bindings/java/src/jni/win32/eventlog.c +++ b/bindings/java/src/jni/win32/eventlog.c @@ -351,7 +351,7 @@ JNIEXPORT jobject SIGAR_JNI(win32_EventLog_readlog) /* Increment up to the machine name. */ machineName = (LPWSTR)((LPBYTE)pevlr + sizeof(EVENTLOGRECORD) + - wcslen(source) + 1); + (wcslen(source) + 1) * sizeof(WCHAR)); UNICODE_SetStringField("computerName", machineName); /* Get user id info */