Issue Details (XML | Word | Printable)

Key: CORE-1594
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Adriano dos Santos Fernandes
Reporter: Kovalenko Dmitry
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

BUG in CsConvert::convert

Created: 14/Nov/07 03:31 PM   Updated: 26/Dec/07 01:14 PM
Component/s: Engine
Affects Version/s: 2.1 Alpha 1, 2.1 Beta 1, 2.1 Beta 2
Fix Version/s: 2.1 RC1

Time Tracking:
Original Estimate: 1 hour
Original Estimate - 1 hour
Remaining Estimate: 1 hour
Remaining Estimate - 1 hour
Time Spent: Not Specified
Remaining Estimate - 1 hour

File Attachments: 1. Text File CsConvert.h (8 kB)



 Description  « Hide
Wrong cycle of ignore trailing spaces
 - uses end of temp_buffer instead of end of data in temp_buffer

See corrected source in attach

---
PS. I make small refactoring of this code :))

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Alexander Peshkov added a comment - 16/Nov/07 03:27 AM
Dmitry, please take into an account for the future - doing reinterpret_cast<const USHORT*>(UCHAR*) (or any other cast leading to stronger alignment requirements) is very dangerous. If original data is not aligned properly, it will break all RISC builds (like sparc, parisc).
I understand that doing development on machines where alignment is not 'must be' thing makes us forget about alignment issues, but please remember that firebird is also used on other CPUs.

Kovalenko Dmitry added a comment - 16/Nov/07 04:27 PM
Alexander, I know about problems with bad-alignment by RISC machines. Thanks :)

And I know, also, than separation of generic "csconvert" on "csconvert_ucs2_to_mbc" and "csconvert_mbc_to_ucs2" can prevent this problems.