Fossil

Check-in [10b98c1e]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix crash introduced by merge of andygoth-quote-apostrophe
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | andygoth-timeline-ms
Files: files | file ages | folders
SHA1:10b98c1e612bcca54bdc47ed3aa7abdce2adb842
User & Date: andygoth 2016-11-04 22:12:14
Context
2016-11-04
23:13
Fix various typos in makeheaders.html. Use curly quotes instead of classic `` and '' quotes (ref: http://www.dwheeler.com/essays/quotes-in-html.html). Format most such quoted text in monospace print. check-in: 9b960af1 user: andygoth tags: andygoth-timeline-ms
22:12
Fix crash introduced by merge of andygoth-quote-apostrophe check-in: 10b98c1e user: andygoth tags: andygoth-timeline-ms
21:55
Merge trunk check-in: 250c12c2 user: andygoth tags: andygoth-timeline-ms
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/encode.c.

37
38
39
40
41
42
43

44
45
46
47
48
49
50
  if( n<0 ) n = strlen(zIn);
  while( i<n && (c = zIn[i])!=0 ){
    switch( c ){
      case '<':   count += 4;       break;
      case '>':   count += 4;       break;
      case '&':   count += 5;       break;
      case '"':   count += 6;       break;

      default:    count++;          break;
    }
    i++;
  }
  i = 0;
  zOut = fossil_malloc( count+1 );
  while( n-->0 && (c = *zIn)!=0 ){







>







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
  if( n<0 ) n = strlen(zIn);
  while( i<n && (c = zIn[i])!=0 ){
    switch( c ){
      case '<':   count += 4;       break;
      case '>':   count += 4;       break;
      case '&':   count += 5;       break;
      case '"':   count += 6;       break;
      case '\'':  count += 5;       break;
      default:    count++;          break;
    }
    i++;
  }
  i = 0;
  zOut = fossil_malloc( count+1 );
  while( n-->0 && (c = *zIn)!=0 ){