/[LeafOK_CVS]/lbbs/src/lml.c
ViewVC logotype

Diff of /lbbs/src/lml.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.27 by sysadm, Fri Oct 24 07:27:02 2025 UTC Revision 1.28 by sysadm, Fri Oct 24 07:45:06 2025 UTC
# Line 265  int lml_render(const char *str_in, char Line 265  int lml_render(const char *str_in, char
265                          }                          }
266                  }                  }
267    
268                  if (str_in[i] == '\n')                  if (str_in[i] == '\n') // jump out of tag at end of line
269                  {                  {
270                          tag_name_pos = -1; // jump out of tag at end of line                          if (tag_start_pos != -1) // tag is not closed
271                            {
272                                    tag_end_pos = i - 1;
273                                    tag_output_len = tag_end_pos - tag_start_pos + 1;
274                                    if (j + tag_output_len >= buf_len)
275                                    {
276                                            log_error("Buffer is not longer enough for output string %ld >= %d\n", j + tag_output_len, buf_len);
277                                            str_out[j] = '\0';
278                                            return j;
279                                    }
280    
281                                    memcpy(str_out + j, str_in + tag_start_pos, (size_t)tag_output_len);
282                                    j += tag_output_len;
283                            }
284    
285                            tag_start_pos = -1;
286                            tag_name_pos = -1;
287                          new_line = 1;                          new_line = 1;
288                  }                  }
289                  else if (str_in[i] == '\r')                  else if (str_in[i] == '\r')


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

webmaster@leafok.com
ViewVC Help
Powered by ViewVC 1.3.0-beta1