MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / IsCommentUnsafe

Function IsCommentUnsafe

Libraries/unrar/consio.cpp:326–340  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324
325
326static bool IsCommentUnsafe(const wchar *Data,size_t Size)
327{
328 for (size_t I=0;I<Size;I++)
329 if (Data[I]==27 && Data[I+1]=='[')
330 for (size_t J=I+2;J<Size;J++)
331 {
332 // Return true for <ESC>[{key};"{string}"p used to redefine
333 // a keyboard key on some terminals.
334 if (Data[J]=='\"')
335 return true;
336 if (!IsDigit(Data[J]) && Data[J]!=';')
337 break;
338 }
339 return false;
340}
341
342
343void OutComment(const wchar *Comment,size_t Size)

Callers 1

OutCommentFunction · 0.85

Calls 1

IsDigitFunction · 0.85

Tested by

no test coverage detected