Skip to content

Commit

Permalink
Update note-c dependency (#73)
Browse files Browse the repository at this point in the history
* remove note-c before re-add

* Squashed 'src/note-c/' content from commit 2898b82

git-subtree-dir: src/note-c
git-subtree-split: 2898b821392663b6de6ab359a56c41401ab96c95
  • Loading branch information
zfields authored Dec 14, 2021
1 parent fc42130 commit b764006
Show file tree
Hide file tree
Showing 7 changed files with 529 additions and 193 deletions.
2 changes: 1 addition & 1 deletion src/note-c/n_cjson.c
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ static Jbool print_number(const J * const item, printbuffer * const output_buffe
JNUMBER d = item->valuenumber;
int length = 0;
size_t i = 0;
unsigned char number_buffer[26]; /* temporary buffer to print the number into */
unsigned char number_buffer[JNTOA_MAX]; /* temporary buffer to print the number into */
unsigned char decimal_point = get_decimal_point();

if (output_buffer == NULL) {
Expand Down
12 changes: 6 additions & 6 deletions src/note-c/n_cjson_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,14 +350,14 @@ bool JGetBinaryFromObject(J *rsp, const char *fieldName, uint8_t **retBinaryData
// Allocate a buffer for the payload
char *p = (char *) _Malloc(JB64DecodeLen(payload));
if (p == NULL) {
return false;
}
return false;
}
uint32_t actualLen = JB64Decode(p, payload);

// Return the binary to the caller
*retBinaryData = (uint8_t *)p;
*retBinaryDataLen = actualLen;
return true;
// Return the binary to the caller
*retBinaryData = (uint8_t *)p;
*retBinaryDataLen = actualLen;
return true;

}

Expand Down
Loading

0 comments on commit b764006

Please sign in to comment.