Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bdsh/input.c

    r19f857a rbc77bfa  
    3232#include <stdio.h>
    3333#include <stdlib.h>
    34 #include <str.h>
     34#include <string.h>
    3535#include <io/console.h>
    3636#include <io/keycode.h>
     
    508508{
    509509        int sa, sb;
     510        wchar_t tmp_c;
    510511        char *str;
    511512
     
    513514
    514515        if (sb < ti->nc) {
    515                 wchar_t tmp_c = ti->buffer[sb];
     516                tmp_c = ti->buffer[sb];
    516517                ti->buffer[sb] = '\0';
    517                 str = wstr_to_astr(ti->buffer + sa);
     518        }
     519
     520        str = wstr_to_astr(ti->buffer + sa);
     521
     522        if (sb < ti->nc)
    518523                ti->buffer[sb] = tmp_c;
    519         } else
    520                 str = wstr_to_astr(ti->buffer + sa);
    521        
     524
    522525        if (str == NULL)
    523526                goto error;
Note: See TracChangeset for help on using the changeset viewer.