Commit d3eddeb1 authored by claes's avatar claes

Bugfix in url symbol replacement

parent f1f8976e
......@@ -74,7 +74,7 @@ static int replace_symbol( pwr_tURL in, pwr_tURL out,
if ( *s == '$' && !skip_sym) {
if ( sym_start) {
strncpy( sym_name, sym_start+1, s - (sym_start + 1));
sym_name[s - sym_start] = 0;
sym_name[s - sym_start - 1] = 0;
if ( find_symbol( sym_name, sym_value, config)) {
strcpy( t, sym_value);
t += strlen(sym_value);
......@@ -94,7 +94,7 @@ static int replace_symbol( pwr_tURL in, pwr_tURL out,
if ( !(isdigit(*s) || isalpha(*s) || *s == '_')) {
// End of symbol
strncpy( sym_name, sym_start+1, s - (sym_start + 1));
sym_name[s - sym_start] = 0;
sym_name[s - sym_start - 1] = 0;
if ( find_symbol( sym_name, sym_value, config)) {
strcpy( t, sym_value);
t += strlen(sym_value);
......
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