diff --git a/radio/rfsimulator/simulator.c b/radio/rfsimulator/simulator.c index d944e028bbbe24e4749bf82e5579e2e444420ec3..670998f57eb33bc8ef9b259b66ae2ee9789eb509 100644 --- a/radio/rfsimulator/simulator.c +++ b/radio/rfsimulator/simulator.c @@ -182,6 +182,8 @@ typedef struct { static int allocCirBuf(rfsimulator_state_t *bridge, int sock) { + /* TODO: cleanup code so that this AssertFatal becomes useless */ + AssertFatal(sock >= 0 && sock < sizeofArray(bridge->buf), "socket %d is not in range\n", sock); buffer_t *ptr=&bridge->buf[sock]; ptr->circularBuf = calloc(1, sampleToByte(CirSize, 1)); if (ptr->circularBuf == NULL) {