Opened 16 years ago
Closed 16 years ago
Last modified 16 years ago
#4643 closed patch (fixed)
test for empty string
Reported by: | Owned by: | danielk | |
---|---|---|---|
Priority: | minor | Milestone: | 0.21 |
Component: | mythtv | Version: | head |
Severity: | low | Keywords: | |
Cc: | Ticket locked: | no |
Description
In the file avformatdecoder.cpp, in the member function AvFormatDecoder::ScanStreams? there are two tests for the validity of the character array language. Since it is an array and not a pointer, checking for its validity is likely not correct. If you look at what is attempted inside the test brackets you see that what is likely is that the coder is testing to see if the string is empty.
So the test has been changed to check for emptiness of string instead of validity of pointer.
Attachments (2)
Change History (5)
Changed 16 years ago by
Attachment: | fix-test-for-empty-string added |
---|
comment:1 Changed 16 years ago by
Owner: | changed from Isaac Richards to danielk |
---|---|
Status: | new → assigned |
Changed 16 years ago by
Attachment: | 4643-v1.patch added |
---|
Untested fix. The original patch may have create some unexpected results when there are no languages defined. This patch should work, but I haven't tested it yet.
comment:2 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:3 Changed 16 years ago by
Indeed, the defect seems fixed. And your patch is definitely a better fix. Don't forget to commit your patch to the trunk.
changes test from pointer validity to string emptiness