Skip to content

Commit

Permalink
fixed write typed bug on string
Browse files Browse the repository at this point in the history
  • Loading branch information
jweinst1 committed Jun 14, 2018
1 parent deef578 commit b6b2e69
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/flow/WindComp.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,12 @@ unsigned WindComp_write_typed(const unsigned char* item)
WindComp_BUF[ds] = *item++;
WindComp_ITEM_LEN = sizeof(unsigned char) + sizeof(double);
return WindComp_ITEM_LEN;
case WindType_String:
WindComp_BUF[0] = *item++;
WindComp_ITEM_LEN = *(unsigned*)(item) + sizeof(unsigned) + sizeof(unsigned char);
memcpy(WindComp_BODY, (unsigned char*)item, WindComp_ITEM_LEN);
return WindComp_ITEM_LEN;

default:
return 0;
}
Expand Down

0 comments on commit b6b2e69

Please sign in to comment.