We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm trying to sync data with publicCloudDatabase.
YapDatabase (2.9.1) YapDatabaseCloudKit -> YapDatabaseCloudKitTransaction.m -> line 1069
memcpy(buffer, (void *)'_', 1); cause EXC_BAD_ACCESS crash. I am not sure that casting char to void* makes sense.
memcpy(buffer, (void *)'_', 1);
char
void*
Solution 1: I've changed '_' to "_" and now char* to void* casting seems working. memcpy(buffer, (void *)"_", 1);
'_'
"_"
char*
memcpy(buffer, (void *)"_", 1);
Solution 2: char underscore = '_'; memcpy(buffer, (void *)(&underscore), 1);
char underscore = '_';
memcpy(buffer, (void *)(&underscore), 1);
For both solutions sync works well. But I'm not sure which one was supposed to be here.
Please take a look on that. Thanks.
The text was updated successfully, but these errors were encountered:
Fix crash when using non-nil database id
a473246
yapstudios#345
Bug fix for issue #345 - Cast issue in hashRecordID:databaseIdentifier:
34311a2
0d33ad7
Good catch. And thanks for the solutions.
Sorry, something went wrong.
No branches or pull requests
I'm trying to sync data with publicCloudDatabase.
YapDatabase (2.9.1)
YapDatabaseCloudKit -> YapDatabaseCloudKitTransaction.m -> line 1069
memcpy(buffer, (void *)'_', 1);
cause EXC_BAD_ACCESS crash. I am not sure that castingchar
tovoid*
makes sense.Solution 1: I've changed
'_'
to"_"
and nowchar*
tovoid*
casting seems working.memcpy(buffer, (void *)"_", 1);
Solution 2:
char underscore = '_';
memcpy(buffer, (void *)(&underscore), 1);
For both solutions sync works well. But I'm not sure which one was supposed to be here.
Please take a look on that.
Thanks.
The text was updated successfully, but these errors were encountered: