Skip to content

Commit d4e8297

Browse files
authored
fix int overflow (#9261)
1 parent 005a3e3 commit d4e8297

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ydb/core/persqueue/pq_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1628,8 +1628,8 @@ void TPersQueue::ProcessUpdateConfigRequest(TAutoPtr<TEvPersQueue::TEvUpdateConf
16281628
{
16291629
auto& record = ev->Record;
16301630

1631-
int oldConfigVersion = Config.HasVersion() ? Config.GetVersion() : -1;
1632-
int newConfigVersion = NewConfig.HasVersion() ? NewConfig.GetVersion() : oldConfigVersion;
1631+
int oldConfigVersion = Config.HasVersion() ? static_cast<int>(Config.GetVersion()) : -1;
1632+
int newConfigVersion = NewConfig.HasVersion() ? static_cast<int>(NewConfig.GetVersion()) : oldConfigVersion;
16331633

16341634
Y_ABORT_UNLESS(newConfigVersion >= oldConfigVersion);
16351635

0 commit comments

Comments
 (0)