Skip to content
Permalink
Browse files

Add sanity check for debug trace print statement (fix #1420)

  • Loading branch information
gfwilliams committed May 18, 2018
1 parent 8a44b04 commit b6d362f6a1f2de0b3e7604848116efb509196bf4
Showing with 2 additions and 1 deletion.
  1. +1 −0 ChangeLog
  2. +1 −1 src/jsvar.c
@@ -22,6 +22,7 @@
Move default I2C bitrate to 100kbit/sec
Linux: don't create a espruino.flash file if we're not writing to flash
Add height check for Graphics.createArrayBuffer(...vertical_byte:true) (fix #1421)
Add sanity check for debug trace print statement (fix #1420)

1v97 : nRF52: fix NRF.on('connect',...) issue
STM32: Fix setDeviceClockCmd error for USB.setConsole()
@@ -3314,7 +3314,7 @@ void _jsvTrace(JsVar *var, int indent, JsVar *baseVar, int level) {
else if (jsvIsFloat(var)) jsiConsolePrintf("Double %f", jsvGetFloat(var));
else if (jsvIsFunctionParameter(var)) jsiConsolePrintf("Param %q ", var);
else if (jsvIsArrayBufferName(var)) jsiConsolePrintf("ArrayBufferName[%d] ", jsvGetInteger(var));
else if (jsvIsArrayBuffer(var)) jsiConsolePrintf("%s ", jswGetBasicObjectName(var)); // way to get nice name
else if (jsvIsArrayBuffer(var)) jsiConsolePrintf("%s ", jswGetBasicObjectName(var)?jswGetBasicObjectName(var):"unknown ArrayBuffer"); // way to get nice name
else if (jsvIsString(var)) {
size_t blocks = 1;
if (jsvGetLastChild(var)) {

0 comments on commit b6d362f

Please sign in to comment.