-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NUI] Fix some svace issues. #5344
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good
83d2408
to
edd239e
Compare
@@ -54,7 +54,7 @@ internal VertexBuffer(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, | |||
|
|||
public void SetData<VertexType>(VertexType[] vertices) where VertexType : struct | |||
{ | |||
if (null == vertices) | |||
if (null == vertices || vertices.Length == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor. Could you please add comments about exception (line 52) that we can throw exception if certices length is zero?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Thanks.
edd239e
to
bc33039
Compare
Description of Change
WID:56638093 An overflow in the arithmetic expression sizeof(IntPtr) * textures.Count which is used in Marshal.AllocHGlobal(sizeof(IntPtr) * textures.Count) may occur. Please use checked arithmetic to throw IntegerOverflowException in case of overflow instead of possible memory damage
WID:56646651 The iteration number in loop with condition i < _parts.Count - 1 is off by one
WID:56638091 An overflow in the arithmetic expression structSize * vertices.Length which is used in Marshal.AllocHGlobal(structSize * vertices.Length) may occur. Please use checked arithmetic to throw IntegerOverflowException in case of overflow instead of possible memory damage
API Changes