Looks like it could solve the problems I've been having. I'll give it
a go over the weekend and report back
Thanks!
Olly
On 1/12/07, Bob Copeland <[EMAIL PROTECTED]> wrote:
> Franky, this fixes another bug in saving the smalldb
> # HG changeset patch
> # User [EMAIL PROTECTED]
> # Date 1168608159 18000
> # Node ID 5ae80f075d3829b0a22b9cc26a7e521abf2300f3
> # Parent 9c805535e504cf8a379cdc028941499b011a7100
> Fix props.count off-by-one
>
> diff -r 9c805535e504 -r 5ae80f075d38 src/properties.c
> --- a/src/properties.c Thu Jan 11 18:56:45 2007 -0500
> +++ b/src/properties.c Fri Jan 12 08:22:39 2007 -0500
> @@ -517,7 +517,7 @@ int lk_properties_write_property(FILE *f
> offset_16 = (uint16_t *) offset;
>
> if (type == SDB_BLOB || type == SDB_STRING) {
> - for(i=0,j=16,off=0; i<props.count-1; j++) {
> + for(i=0,j=16,off=0; i<props.count; j++) {
> if(!props.fidTable[j]) continue;
> str = lk_properties_get_property(j*16,attr);
> if (str) {
> @@ -612,7 +612,7 @@ int lk_properties_write_property(FILE *f
> }
> }
> } else if (type == SDB_LE32) {
> - for(i=0,j=16; i<props.count-1; j++) {
> + for(i=0,j=16; i<props.count; j++) {
> if(!props.fidTable[j]) continue;
> str = lk_properties_get_property(j*16,attr);
> if(!str)
> @@ -623,7 +623,7 @@ int lk_properties_write_property(FILE *f
> }
> fwrite(offset, i*sizeof(uint32_t), 1, fp);
> } else if (type == SDB_LE16) {
> - for(i=0,j=16; i<props.count-1; j++) {
> + for(i=0,j=16; i<props.count; j++) {
> if(!props.fidTable[j]) continue;
> str = lk_properties_get_property(j*16,attr);
> if(!str)
> @@ -634,7 +634,7 @@ int lk_properties_write_property(FILE *f
> }
> fwrite(offset_16, i*sizeof(uint16_t), 1, fp);
> } else if (type == SDB_CHAR) {
> - for(i=0,j=16; i<props.count-1; j++) {
> + for(i=0,j=16; i<props.count; j++) {
> if(!props.fidTable[j]) continue;
> str = lk_properties_get_property(j*16,attr);
> if(!str)
> --
> Bob Copeland %% www.bobcopeland.com
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> linux-karma-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/linux-karma-devel
>
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-karma-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-karma-devel