Skip to content
代码片段 群组 项目
未验证 提交 c694dc70 编辑于 作者: github-actions[bot]'s avatar github-actions[bot] 提交者: GitHub
浏览文件

Sync shared code from runtime (#42276)

上级 10b1fd98
No related branches found
No related tags found
无相关合并请求
...@@ -73,7 +73,7 @@ namespace System.Net.Http.HPack ...@@ -73,7 +73,7 @@ namespace System.Net.Http.HPack
throw new HPackDecodingException(SR.net_http_hpack_bad_integer); throw new HPackDecodingException(SR.net_http_hpack_bad_integer);
} }
_i = _i + ((b & 0x7f) << _m); _i += ((b & 0x7f) << _m);
// If the addition overflowed, the result will be negative. // If the addition overflowed, the result will be negative.
if (_i < 0) if (_i < 0)
...@@ -81,7 +81,7 @@ namespace System.Net.Http.HPack ...@@ -81,7 +81,7 @@ namespace System.Net.Http.HPack
throw new HPackDecodingException(SR.net_http_hpack_bad_integer); throw new HPackDecodingException(SR.net_http_hpack_bad_integer);
} }
_m = _m + 7; _m += 7;
if ((b & 128) == 0) if ((b & 128) == 0)
{ {
......
...@@ -50,7 +50,7 @@ namespace System.Net.Http.HPack ...@@ -50,7 +50,7 @@ namespace System.Net.Http.HPack
return false; return false;
} }
value = value - ((1 << numBits) - 1); value -= ((1 << numBits) - 1);
int i = 1; int i = 1;
while (value >= 128) while (value >= 128)
...@@ -63,7 +63,7 @@ namespace System.Net.Http.HPack ...@@ -63,7 +63,7 @@ namespace System.Net.Http.HPack
return false; return false;
} }
value = value / 128; value /= 128;
} }
destination[i++] = (byte)value; destination[i++] = (byte)value;
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册