Correct buffer size in NiFi example

This commit is contained in:
CTurt 2014-12-01 11:58:22 +00:00
parent 6f4e8605c2
commit aa07be446a
2 changed files with 2 additions and 1 deletions

Binary file not shown.

View File

@ -207,7 +207,8 @@ void hello_create(helloObjectInstance *me) {
}
void hello_loop(helloObjectInstance *me) {
unsigned short buffer[2 * sizeof(int)];
// Buffer must be aligned to 2 bytes, so use unsigned short
unsigned short buffer[(2 * sizeof(int)) / sizeof(unsigned short)];
if(DSGM_held.Stylus) {
me->x = DSGM_stylus.x - 16;