Skip to content

Commit

Permalink
fix compilation for gcc linux
Browse files Browse the repository at this point in the history
  • Loading branch information
uraymeiviar committed Sep 18, 2014
1 parent 8ab3ed3 commit af338c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/nxt/nxt_address.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ char* NxtAddress::c_str(bool prefix)

for(int i = 0; i < 17; i++)
{
out[pos++] = alphabet[(int)codeword[cwmap[i]]];
out[pos++] = alphabet[(int)codeword[(int)cwmap[i]]];

if((i & 3) == 3 && i < 13) out[pos++] = '-';
}
Expand All @@ -72,7 +72,7 @@ char* NxtAddress::account_id()
{
static char out[21];

sprintf(out, "%llu", uint64_t(*this));
sprintf(out, "%llu", (unsigned long long)(*this));

return out;
}
Expand All @@ -89,11 +89,11 @@ bool NxtAddress::set(char *adr)
{
if(digits > 5 && digits < 21)
{
uint64_t acc;
uint64_t acc;

if(digits == 20 && *adr != '1') return false;

if(sscanf(adr, "%llu", &acc) == 1)
if(sscanf(adr, "%llu", (unsigned long long*)&acc) == 1)
{
*this = acc; return true;
}
Expand All @@ -111,7 +111,7 @@ bool NxtAddress::set(char *adr)

if(len > 16) return false;

codeword[cwmap[len++]] = p - alphabet;
codeword[(int)cwmap[len++]] = p - alphabet;
}
}

Expand Down

0 comments on commit af338c5

Please sign in to comment.