소스 검색
Protect TextIsEqual from NULLs (#2121)
pull/2124/head
Luke Krasnoff
3 년 전
committed by
GitHub
No known key found for this signature in database
GPG 키 ID: 4AEE18F83AFDEB23
1개의 변경된 파일과
4개의 추가작업 그리고
0개의 파일을 삭제
-
src/rtext.c
|
|
@ -1142,6 +1142,10 @@ bool TextIsEqual(const char *text1, const char *text2) |
|
|
|
{ |
|
|
|
bool result = false; |
|
|
|
|
|
|
|
if (text1 == NULL || text2 == NULL) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
if (strcmp(text1, text2) == 0) result = true; |
|
|
|
|
|
|
|
return result; |
|
|
|