Changeset 4083c49 for viewwin.c


Ignore:
Timestamp:
Aug 22, 2009, 12:49:20 AM (12 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
303a9e1
Parents:
f4d4a00
git-author:
Anders Kaseorg <andersk@mit.edu> (08/22/09 00:18:32)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/22/09 00:49:20)
Message:
Fix unchecked accesses to s[strlen(s) - 1].

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • viewwin.c

    r075ba92 r4083c49  
    1212  if (text) {
    1313    owl_fmtext_append_normal(&(v->fmtext), text);
    14     if (text[strlen(text)-1]!='\n' && text[0]!='\0') {
     14    if (text[0] != '\0' && text[strlen(text) - 1] != '\n') {
    1515      owl_fmtext_append_normal(&(v->fmtext), "\n");
    1616    }
Note: See TracChangeset for help on using the changeset viewer.