File tree Expand file tree Collapse file tree 5 files changed +6
-3
lines changed Expand file tree Collapse file tree 5 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 112021-06-05 (12.22)
22 COMMON: Fixes 'Socket Client doesn't receive byte with value 13' #112
3+ COMMON: Fixes TSAVE of arrays includes extra null character. #119
34
452021-05-03 (12.22)
56 COMMON: Fix array access regression
Original file line number Diff line number Diff line change @@ -530,7 +530,7 @@ void cmd_print(int output) {
530530 if (code_peek () == kwTYPE_EOC || code_peek () == kwTYPE_LINE ) {
531531 // There are no parameters
532532 if (dev_fstatus (handle )) {
533- dev_fwrite (handle , (byte * )OS_LINESEPARATOR , sizeof ( OS_LINESEPARATOR ) );
533+ dev_fwrite (handle , (byte * )OS_LINESEPARATOR , OS_LINESEPARATOR_LEN );
534534 } else {
535535 err_fopen ();
536536 }
Original file line number Diff line number Diff line change @@ -725,7 +725,7 @@ void cmd_fsaveln() {
725725 for (int i = 0 ; i < v_asize (array_p ); i ++ ) {
726726 var_p = v_elem (array_p , i );
727727 fprint_var (handle , var_p );
728- dev_fwrite (handle , (byte * )OS_LINESEPARATOR , sizeof ( OS_LINESEPARATOR ) );
728+ dev_fwrite (handle , (byte * )OS_LINESEPARATOR , OS_LINESEPARATOR_LEN );
729729 }
730730 } else {
731731 // parameter is an string
Original file line number Diff line number Diff line change @@ -25,7 +25,6 @@ bcip_t comp_search_bc(bcip_t ip, code_t code);
2525bcip_t comp_next_bc_cmd (bc_t * bc , bcip_t ip );
2626extern void expr_parser (bc_t * bc );
2727
28- #define STRLEN (s ) ((sizeof(s) / sizeof(s[0])) - 1)
2928const int LEN_OPTION = STRLEN (LCN_OPTION );
3029const int LEN_IMPORT = STRLEN (LCN_IMPORT_WRS );
3130const int LEN_UNIT = STRLEN (LCN_UNIT_WRS );
Original file line number Diff line number Diff line change @@ -60,6 +60,9 @@ extern "C" {
6060 #define OS_LINESEPARATOR "\n"
6161#endif
6262
63+ #define STRLEN (s ) ((sizeof(s) / sizeof(s[0])) - 1)
64+ #define OS_LINESEPARATOR_LEN STRLEN(OS_LINESEPARATOR)
65+
6366#if UINTPTR_MAX == 0xffffffff
6467 #define SB_BIT_SZ "_32 "
6568#else
You can’t perform that action at this time.
0 commit comments