Changeset 13:248c7632f540 in rrlib_uri


Ignore:
Timestamp:
06.05.2020 06:52:35 (4 years ago)
Author:
Max Reichardt <mreichardt@…>
Branch:
17.03
Children:
14:9b4a3e51acab, 15:acb9ad28fa9e
Phase:
public
Message:

Removes release-mode compiler warning with gcc 9.3 - and ensures that stack array always has a size > 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tPath.h

    r11 r13  
    227227    // Create element table 
    228228    uint elements[element_count + 1]; 
    229     uint lengths[element_count]; 
     229    uint lengths[element_count + 1]; 
    230230    uint current_offset = absolute ? 1 : 0; 
    231231    for (auto it = begin; it != end; ++it) 
     
    239239 
    240240    // Allocate and fill memory 
    241     size_t table_size = (element_count + 1) * sizeof(uint); 
     241    long int table_size = (element_count + 1) * sizeof(uint); 
    242242    size_t required_memory = table_size + current_offset; 
    243243    memory.resize(required_memory); 
Note: See TracChangeset for help on using the changeset viewer.