39 lines
1.0 KiB
Diff
39 lines
1.0 KiB
Diff
diff -urN liblouis-2.6.2.old/tools/lou_translate.c liblouis-2.6.2/tools/lou_translate.c
|
|
--- liblouis-2.6.2.old/tools/lou_translate.c 2020-05-17 07:37:40.572000000 +0100
|
|
+++ liblouis-2.6.2/tools/lou_translate.c 2020-05-17 07:43:28.596000000 +0100
|
|
@@ -36,8 +36,6 @@
|
|
#include "progname.h"
|
|
#include "version-etc.h"
|
|
|
|
-#define BUFSIZE MAXSTRING - 4
|
|
-
|
|
static int forward_flag = 0;
|
|
static int backward_flag = 0;
|
|
|
|
@@ -58,10 +56,10 @@
|
|
static void
|
|
translate_input (int forward_translation, char *table_name)
|
|
{
|
|
- char charbuf[BUFSIZE];
|
|
+ char charbuf[MAXSTRING];
|
|
char *outputbuf;
|
|
- widechar inbuf[BUFSIZE];
|
|
- widechar transbuf[BUFSIZE];
|
|
+ widechar inbuf[MAXSTRING];
|
|
+ widechar transbuf[MAXSTRING];
|
|
int inlen;
|
|
int translen;
|
|
int k;
|
|
@@ -69,9 +67,9 @@
|
|
int result;
|
|
while (1)
|
|
{
|
|
- translen = BUFSIZE;
|
|
+ translen = MAXSTRING;
|
|
k = 0;
|
|
- while ((ch = getchar ()) != '\n' && ch != EOF && k < BUFSIZE-1)
|
|
+ while ((ch = getchar ()) != '\n' && ch != EOF && k < MAXSTRING-1)
|
|
charbuf[k++] = ch;
|
|
if (ch == EOF && k == 0)
|
|
break;
|