Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix style

  • Loading branch information...
commit c38dd24dc54d347cf200543c880b8befe9e7f04b 1 parent f72ac17
@ry ry authored
Showing with 14 additions and 4 deletions.
  1. +14 −4 src/node_buffer.cc
View
18 src/node_buffer.cc
@@ -570,10 +570,20 @@ Handle<Value> Buffer::Base64Write(const Arguments &args) {
while (src < srcEnd) {
const int remaining = srcEnd - src;
- if (remaining == 0 || *src == '=') break; a = unbase64_table[*src++];
- if (remaining == 1 || *src == '=') break; b = unbase64_table[*src++]; *dst++ = (a << 2) | ((b & 0x30) >> 4);
- if (remaining == 2 || *src == '=') break; c = unbase64_table[*src++]; *dst++ = ((b & 0x0F) << 4) | ((c & 0x3C) >> 2);
- if (remaining == 3 || *src == '=') break; d = unbase64_table[*src++]; *dst++ = ((c & 0x03) << 6) | (d & 0x3F);
+ if (remaining == 0 || *src == '=') break;
+ a = unbase64_table[*src++];
+
+ if (remaining == 1 || *src == '=') break;
+ b = unbase64_table[*src++];
+ *dst++ = (a << 2) | ((b & 0x30) >> 4);
+
+ if (remaining == 2 || *src == '=') break;
+ c = unbase64_table[*src++];
+ *dst++ = ((b & 0x0F) << 4) | ((c & 0x3C) >> 2);
+
+ if (remaining == 3 || *src == '=') break;
+ d = unbase64_table[*src++];
+ *dst++ = ((c & 0x03) << 6) | (d & 0x3F);
}
return scope.Close(Integer::New(size));
Please sign in to comment.
Something went wrong with that request. Please try again.