Skip to content

Commit 68bc8a4

Browse files
committed
fixed osc sender out of range bug on reloading patch
1 parent 4a10636 commit 68bc8a4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/objects/communications/OscSender.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -329,12 +329,18 @@ void OscSender::initInlets(){
329329
}
330330
if (XML.pushTag("vars")){
331331
int totalOutlets = XML.getNumTags("var");
332-
this->numInlets = totalOutlets-1;
332+
this->numInlets = totalOutlets-2;
333333

334334
int tempCounter = 0;
335335
for (int t=0;t<totalOutlets;t++){
336336
if(XML.pushTag("var",t)){
337-
if(XML.getValue("name","") != "PORT"){
337+
bool isreceiverIP = false;
338+
if (XML.getValue("name","").find('@') != std::string::npos){
339+
isreceiverIP = true;
340+
}else{
341+
isreceiverIP = false;
342+
}
343+
if(XML.getValue("name","") != "PORT" && !isreceiverIP){
338344
if(tempTypes.at(tempCounter) == 0){ // float
339345
_inletParams[tempCounter] = new float();
340346
*(float *)&_inletParams[tempCounter] = 0.0f;

0 commit comments

Comments
 (0)