am 0d2cece0: am 3083b4b7: Merge "Fix a debug method" into jb-mr1-dev
* commit '0d2cece02d3bdafa54d3dcf5abf344a71f3a5eaa': Fix a debug methodmain
commit
7d6a211702
|
@ -22,7 +22,7 @@
|
||||||
static inline unsigned char *convertToUnibyteString(unsigned short *input, unsigned char *output,
|
static inline unsigned char *convertToUnibyteString(unsigned short *input, unsigned char *output,
|
||||||
const unsigned int length) {
|
const unsigned int length) {
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
for (; i <= length && input[i] != 0; ++i)
|
for (; i < length && input[i] != 0; ++i)
|
||||||
output[i] = input[i] & 0xFF;
|
output[i] = input[i] & 0xFF;
|
||||||
output[i] = 0;
|
output[i] = 0;
|
||||||
return output;
|
return output;
|
||||||
|
@ -31,7 +31,7 @@ static inline unsigned char *convertToUnibyteString(unsigned short *input, unsig
|
||||||
static inline unsigned char *convertToUnibyteStringAndReplaceLastChar(unsigned short *input,
|
static inline unsigned char *convertToUnibyteStringAndReplaceLastChar(unsigned short *input,
|
||||||
unsigned char *output, const unsigned int length, unsigned char c) {
|
unsigned char *output, const unsigned int length, unsigned char c) {
|
||||||
unsigned int i = 0;
|
unsigned int i = 0;
|
||||||
for (; i <= length && input[i] != 0; ++i)
|
for (; i < length && input[i] != 0; ++i)
|
||||||
output[i] = input[i] & 0xFF;
|
output[i] = input[i] & 0xFF;
|
||||||
if (i > 0) output[i-1] = c;
|
if (i > 0) output[i-1] = c;
|
||||||
output[i] = 0;
|
output[i] = 0;
|
||||||
|
|
Loading…
Reference in New Issue