Ignore:
Timestamp:
2012-04-15T06:18:53Z (12 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f682f5a
Parents:
6484602
Message:

fix printf %s when precision > string length

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/printf_core.c

    r6484602 r94f6df7  
    283283        /* Print leading spaces. */
    284284        size_t strw = str_length(str);
    285         if (precision == 0)
     285        if (precision == 0 || precision > strw)
    286286                precision = strw;
    287287       
     
    331331        /* Print leading spaces. */
    332332        size_t strw = wstr_length(str);
    333         if (precision == 0)
     333        if (precision == 0 || precision > strw)
    334334                precision = strw;
    335335       
Note: See TracChangeset for help on using the changeset viewer.