Skip to content

Commit

Permalink
fixed osc sender out of range bug on reloading patch
Browse files Browse the repository at this point in the history
  • Loading branch information
d3cod3 committed Dec 18, 2020
1 parent 4a10636 commit 68bc8a4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/objects/communications/OscSender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,18 @@ void OscSender::initInlets(){
}
if (XML.pushTag("vars")){
int totalOutlets = XML.getNumTags("var");
this->numInlets = totalOutlets-1;
this->numInlets = totalOutlets-2;

int tempCounter = 0;
for (int t=0;t<totalOutlets;t++){
if(XML.pushTag("var",t)){
if(XML.getValue("name","") != "PORT"){
bool isreceiverIP = false;
if (XML.getValue("name","").find('@') != std::string::npos){
isreceiverIP = true;
}else{
isreceiverIP = false;
}
if(XML.getValue("name","") != "PORT" && !isreceiverIP){
if(tempTypes.at(tempCounter) == 0){ // float
_inletParams[tempCounter] = new float();
*(float *)&_inletParams[tempCounter] = 0.0f;
Expand Down

0 comments on commit 68bc8a4

Please sign in to comment.