FreeCalypso > hg > freecalypso-sw
comparison loadtools/flutil.c @ 199:96f56e875862
fc-loadtool: minor polish in build_flashw_hex_string()
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Thu, 19 Dec 2013 08:06:06 +0000 |
parents | 336f5cc96810 |
children | 61c7480b3c50 |
comparison
equal
deleted
inserted
replaced
198:c9ea2f7441a5 | 199:96f56e875862 |
---|---|
138 int i; | 138 int i; |
139 u_char *dp; | 139 u_char *dp; |
140 char *s; | 140 char *s; |
141 | 141 |
142 for (dp = bin, s = strbuf, i = 0; i < nwords; dp += 2, s += 4, i++) { | 142 for (dp = bin, s = strbuf, i = 0; i < nwords; dp += 2, s += 4, i++) { |
143 if (m0src) { | 143 if (m0src) |
144 sprintf(s, "%02X", dp[0]); | 144 sprintf(s, "%02X%02X", dp[0], dp[1]); |
145 sprintf(s + 2, "%02X", dp[1]); | 145 else |
146 } else { | 146 sprintf(s, "%02X%02X", dp[1], dp[0]); |
147 sprintf(s, "%02X", dp[1]); | |
148 sprintf(s + 2, "%02X", dp[0]); | |
149 } | |
150 } | 147 } |
151 *s = '\0'; | 148 *s = '\0'; |
152 } | 149 } |