Commit adff4ce4 authored by Claes Sjofors's avatar Claes Sjofors

Wb dataarithm error for long code lines

parent 80d0f766
......@@ -133,6 +133,7 @@ misplacedthread <Misplaced thread object> /error
obsolete <Object is obsolete> /error
ccwarning <Warning from c compiler or linker> /warning
ccsucc <Window compiled> /info
dataalinesize <DataArithm maximum line size exceeded> /error
.facility FOE,280 /prefix = FOE__ ! Function object editor
......
......@@ -1584,6 +1584,8 @@ static int dataa_get_next_line( char *str,
i++;
t++;
s++;
if ( i == size)
return -1;
}
*t = *s;
if ( *s == 0) return 1;
......@@ -1721,7 +1723,7 @@ pwr_tStatus dataarithm_convert (
char *t;
char *delim_p;
int hit, delim_hit;
char tmpstr[160];
char tmpstr[200];
char *write_from;
int first_line;
int end_of_text;
......@@ -1742,6 +1744,12 @@ pwr_tStatus dataarithm_convert (
{
end_of_text = dataa_get_next_line( str, &p, line, sizeof(line),
first_line);
if ( end_of_text == -1) {
strncpy( error_line, line, *error_line_size);
error_line[*error_line_size-1] = 0;
*error_line_num = dataactx->line_count + 1;
return GSX__DATAALINESIZE;
}
dataactx->line_count++;
first_line = 0;
item_ptr = dataactx->items;
......
......@@ -12635,7 +12635,7 @@ int gcg_comp_m42( gcg_ctx gcgctx, vldh_t_node node)
ldh_tSesContext ldhses;
char *expression;
char *newstr;
char error_line[80];
char error_line[200];
int error_num;
int error_line_size = sizeof(error_line);
char pointer_name[80];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment