ccgus/fmdb — pull request #328 by ChristianKienle (2014-12-29 13:41:31+00:00)
Title: Fixes wrong handling of sqlite3_column_bytes(...).

According to the official documentation of SQLite the order in which you call sqlite3_column_bytes and sqlite3_column_blob (and the related methods to retrieve the stored value) is important:

"In other words, you should call sqlite3_column_text(), sqlite3_column_blob(), or sqlite3_column_text16() first to force the result into the desired format, then invoke sqlite3_column_bytes() or sqlite3_column_bytes16() to find the size of the result. Do not mix calls to sqlite3_column_text() or sqlite3_column_blob() with calls to sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16() with calls to sqlite3_column_bytes()."

This commit simply changes the order of those calls to conform to the official documentation.