Browse Source

Fix switches array size in QuickJS.

tags/v1.3.0
Andrew Belt 5 years ago
parent
commit
730409458d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/QuickJSEngine.cpp

+ 1
- 1
src/QuickJSEngine.cpp View File

@@ -162,7 +162,7 @@ struct QuickJSEngine : ScriptEngine {
JS_SetPropertyStr(ctx, blockIdx, "knobs", knobsIdx);

// switches
JSValue switchesIdx = JS_NewArrayBuffer(ctx, (uint8_t *) &block->switches, sizeof(bool) * block->bufferSize, NULL, NULL, true);
JSValue switchesIdx = JS_NewArrayBuffer(ctx, (uint8_t *) &block->switches, sizeof(bool) * NUM_ROWS, NULL, NULL, true);
JS_SetPropertyStr(ctx, blockIdx, "switches", switchesIdx);

// lights


Loading…
Cancel
Save