Added 1 to Utf8BufSize() for worst case

This commit is contained in:
Klaus Schmidinger 2025-01-13 13:18:42 +01:00
parent 2c6c014dd8
commit 53cac302d8
3 changed files with 4 additions and 2 deletions

View File

@ -3371,6 +3371,7 @@ Stefan Hofmann <stefan.hofmann@t-online.de>
for suggesting to implement jumping between errors while replaying a recording
for adding vdrrootdir and incdir to vdr.pc
for fixing some typos in the translation files
for adding 1 to Utf8BufSize() for worst case
Stefan Blochberger <Stefan.Blochberger@gmx.de>
for suggesting to automatically display the progress display whenever replay of a

View File

@ -10049,3 +10049,4 @@ Video Disk Recorder Revision History
schedule.
- Fixed a possible deadlock when canceling an editing process.
- Checking for VPS control is now limited to local timers.
- Added 1 to Utf8BufSize() for worst case (thanks to Stefan Hofmann).

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
* $Id: tools.h 5.10 2024/09/01 20:43:40 kls Exp $
* $Id: tools.h 5.11 2025/01/13 13:18:42 kls Exp $
*/
#ifndef __TOOLS_H
@ -140,7 +140,7 @@ int Utf8FromArray(const uint *a, char *s, int Size, int Max = -1);
// When allocating buffer space, make sure we reserve enough space to hold
// a string in UTF-8 representation:
#define Utf8BufSize(s) ((s) * 4)
#define Utf8BufSize(s) ((s) * 4 + 1)
// The following macros automatically use the correct versions of the character
// class functions: