Changeset 468:a1bfec1a20ae in finroc_core


Ignore:
Timestamp:
12.02.2020 14:34:04 (2 weeks ago)
Author:
Max Reichardt <max.reichardt@…>
Branch:
14.08
Phase:
public
Message:

Fixes bug that could lead to cases of handles from the range of port handles being assigned to non-ports (this does not appear to be critical)

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • internal/tFrameworkElementRegister.cpp

    r362 r468  
    204204  assert(array_chunks[primary_index] && array_chunks[primary_index]->array[secondary_index] && array_chunks[primary_index]->array[secondary_index]->GetHandle() == handle); 
    205205  array_chunks[primary_index]->array[secondary_index] = NULL; 
    206   unused_slot_queue.push(tUnusedSlot(handle)); 
     206  (handle >= cFIRST_PORT_HANDLE ? unused_port_slot_queue : unused_slot_queue).push(tUnusedSlot(handle)); 
    207207} 
    208208 
  • tFrameworkElement.cpp

    r416 r468  
    128128  } 
    129129 
     130  assert((handle >= internal::tFrameworkElementRegister::cFIRST_PORT_HANDLE) == flags.Get(tFlag::PORT) && "Invalid handle assigned"); 
    130131  FINROC_LOG_PRINT(DEBUG_VERBOSE_1, "Constructing tFrameworkElement (" , this, ")"); 
    131132} 
Note: See TracChangeset for help on using the changeset viewer.