Changeset 3f4716370794db5cdaed9eca07c85133b9a9d624

Show
Ignore:
Timestamp:
05/23/08 22:03:56 (7 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1211580236 +0000
git-parent:

[bcb45436ba0ff838e5343a7b9df8e542ad4e35bd]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1211580236 +0000
Message:

actually fixes #20

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_console_state.c

    r32f6f16 r3f47163  
    3838  slen = strlen(src); 
    3939  /* Worst case is just a stream of replacements. */ 
    40   maxlen = (slen / patlen) * vlen + (slen % patlen) + 2
     40  maxlen = (slen / patlen) * MAX(vlen,patlen) + (slen % patlen) + 1
    4141  cp = result = malloc(maxlen); 
    4242  searchstart = src;