mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[Script|Dmenu] Don't -1 in a unsigned variable.
This commit is contained in:
parent
34a278f943
commit
de38e0f4a9
1 changed files with 2 additions and 2 deletions
|
@ -81,7 +81,7 @@ void dmenuscript_parse_entry_extras ( G_GNUC_UNUSED Mode *sw, DmenuScriptEntry *
|
|||
length_key++;
|
||||
}
|
||||
// Should be not last character in buffer.
|
||||
if ( length_key < (length-1) ) {
|
||||
if ( (length_key+1) < (length) ) {
|
||||
buffer[length_key] = '\0';
|
||||
char *value = buffer + length_key + 1;
|
||||
if ( strcasecmp ( buffer, "icon" ) == 0 ) {
|
||||
|
@ -104,7 +104,7 @@ static void parse_header_entry ( Mode *sw, char *line, ssize_t length )
|
|||
{
|
||||
ScriptModePrivateData *pd = (ScriptModePrivateData *) sw->private_data;
|
||||
ssize_t length_key = 0;//strlen ( line );
|
||||
while ( length_key <= length && line[length_key] != '\x1f' ) {
|
||||
while ( length_key < length && line[length_key] != '\x1f' ) {
|
||||
length_key++;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue