Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita6f2eee

Browse files
author
Alexander Korotkov
committed
Fix collector out of array access.
1 parent91305b2 commita6f2eee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎collector.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@ get_next_observation(History *observations)
122122
{
123123
HistoryItem*result;
124124

125-
result=&observations->items[observations->index];
126-
observations->index++;
127125
if (observations->index >=observations->count)
128126
{
129127
observations->index=0;
130128
observations->wraparound= true;
131129
}
130+
result=&observations->items[observations->index];
131+
observations->index++;
132132
returnresult;
133133
}
134134

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp