From 6ce6157c8a7e5544a6b825fc9c1e3eb1f5e5de20 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Fri, 4 Nov 2016 20:53:57 -0700 Subject: [PATCH] fix issue in DNA copy, reduce number of test iterations. --- examples/SharedMemory/PhysicsServerCommandProcessor.cpp | 2 +- test/SharedMemory/test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp index 763156d86..cff5acbd1 100644 --- a/examples/SharedMemory/PhysicsServerCommandProcessor.cpp +++ b/examples/SharedMemory/PhysicsServerCommandProcessor.cpp @@ -2190,7 +2190,7 @@ bool PhysicsServerCommandProcessor::processCommand(const struct SharedMemoryComm const char* memDna = btDefaultSerializer::getMemoryDna(); if (sz < bufferSizeInBytes) { - for (int i = 0; i < bufferSizeInBytes; i++) + for (int i = 0; i < sz; i++) { bufferServerToClient[i] = memDna[i]; } diff --git a/test/SharedMemory/test.c b/test/SharedMemory/test.c index a1a6591d8..6037b693e 100644 --- a/test/SharedMemory/test.c +++ b/test/SharedMemory/test.c @@ -228,7 +228,7 @@ void testSharedMemory(b3PhysicsClientHandle sm) #endif } ///perform some simulation steps for testing - for ( i=0;i<10000;i++) + for ( i=0;i<1000;i++) { b3SharedMemoryStatusHandle statusHandle; int statusType;