Commits

Anonymous committed 1162d53

Unicode: fix for weird characters in title bar

  • Participants
  • Parent commits 573dd73

Comments (0)

Files changed (1)

File Unicode/lib/NppDockingForms.pas

   GetMem(self.ToolbarData.AdditionalInfo, 1000*sizeof(nppPChar));
 
 {$IFDEF NPPUNICODE}
-  StringToWideChar(self.Caption, self.ToolbarData.Title, 500);
+  StringToWideChar(self.Caption+#0, self.ToolbarData.Title, 500);
   GetModuleFileNameW(HInstance, self.ToolbarData.ModuleName, 1000);
   StringToWideChar(ExtractFileName(self.ToolbarData.ModuleName), self.ToolbarData.ModuleName, 1000);
   StringToWideChar('', self.ToolbarData.AdditionalInfo, 1);
 procedure TNppDockingForm.UpdateDisplayInfo(Info: String);
 begin
 {$IFDEF NPPUNICODE}
-  StringToWideChar(Info, self.ToolbarData.AdditionalInfo, 1000);
+  StringToWideChar(Info+#0, self.ToolbarData.AdditionalInfo, 1000);
   SendMessageW(self.Npp.NppData.NppHandle, NPPM_DMMUPDATEDISPINFO, 0, self.Handle);
 {$ELSE}
   StrLCopy(self.ToolbarData.AdditionalInfo, PChar(Info), 1000);